Assembling inherent methods on unnormalized projection self
compiler-errors opened this issue · 1 comments
compiler-errors commented
fn main() {
let a = [0x04u8];
a.get_unchecked(0).wrapping_shr(1);
}error[E0599]: no method named `wrapping_shr` found for reference `&<usize as SliceIndex<[u8]>>::Output` in the current scope
--> <source>:3:24
|
3 | a.get_unchecked(0).wrapping_shr(1);
| ^^^^^^^^^^^^ method not found in `&<usize as SliceIndex<[u8]>>::Output`
error: aborting due to previous error
We try to assemble inherent method candidates on &<usize as SliceIndex<[u8]>>::Output instead of u8. We can solve this by recursing on the normalized type in ProbeContext::assemble_probe => compiler-errors/rust@31cd2a7 is roughly the fix.
lcnr commented
fixed because we structurally resolve in method probing