You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1.97 beta regression due to name collision with highest_one #157408
Regression discovered in the 1.97 beta crater run.
[INFO] [stdout] error[E0605]: non-primitive cast: `Option<u32>` as `i8`
[INFO] [stdout] --> src/main.rs:58:58
[INFO] [stdout] |
[INFO] [stdout] 58 | #[inline] fn highest_one(self) -> Self { (self as $ux).highest_one() as _ }
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can be used to convert enum types to numeric types only if the enum type is unit-only or field-less
[INFO] [stdout] ...
[INFO] [stdout] 65 | impl_common_num_ext!(i8 = u8, i16 = u16, i32 = u32, i64 = u64, i128 = u128, isize = usize);
[INFO] [stdout] | ------------------------------------------------------------------------------------------ in this macro invocation
[INFO] [stdout] |
[INFO] [stdout] = note: see https://doc.rust-lang.org/reference/items/enumerations.html#casting for more information
[INFO] [stdout] = note: this error originates in the macro `impl_common_num_ext` (in Nightly builds, run with -Z macro-backtrace for more info)
I thought trait methods that were in scope took precedence over inherent methods? On the assumption that the highest_one method that the crate has from before was an extension trait.
Not really anything that can be done about this then? Presumably this would be considered acceptable breakage, assuming it's not too large in scale. I've not looked at the crater run, admittedly.
Activity
jhpratt commentedon Jun 6, 2026
I thought trait methods that were in scope took precedence over inherent methods? On the assumption that the
highest_onemethod that the crate has from before was an extension trait.theemathas commentedon Jun 7, 2026
@jhpratt It's the opposite. Inherent methods take precedence over trait methods.
jhpratt commentedon Jun 7, 2026
Not really anything that can be done about this then? Presumably this would be considered acceptable breakage, assuming it's not too large in scale. I've not looked at the crater run, admittedly.
joshtriplett commentedon Jun 10, 2026
If it's just one github repo, which looks like it has four commits from 2 years ago, I think we can classify this as acceptable.