Skip to content

Structural resolve doesn't actually structurally resolve #5

@compiler-errors

Description

@compiler-errors
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacked-aroundA hack exists to work around this, but it may not be the optimal solution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions