Structural resolve doesn't actually structurally resolve
compiler-errors opened this issue · 0 comments
compiler-errors commented
struct Foo {
value: usize,
}
fn foo(t: [Foo; 1]) -> usize {
t[0].value
}error[E0609]: no field `value` on type `<usize as SliceIndex<[Foo]>>::Output`
--> <source>:6:10
|
6 | t[0].value
|
We need to normalize any projections eagerly within structurally_resolve, or at least ones that show up at the root of the type (i.e. no need to normalize the projection in Wrapper<<Ty as Trait>::Assoc>.
The fix is rougly compiler-errors/rust@6edd004.