Skip to content

Commit

Permalink
Auto merge of #110204 - compiler-errors:new-solver-hir-typeck-hacks, …
Browse files Browse the repository at this point in the history
…r=lcnr

Deal with unnormalized projections when structurally resolving types with new solver

1. Normalize types in `structurally_resolved_type` when the new solver is enabled
2. Normalize built-in autoderef targets in `Autoderef` when the new solver is enabled
3. Normalize-erasing-regions in `resolve_type` in writeback

This is motivated by the UI test provided, which currently fails with:

```
error[E0609]: no field `x` on type `<usize as SliceIndex<[Foo]>>::Output`
 --> <source>:9:11
  |
9 |     xs[0].x = 1;
  |           ^
```

 I'm pretty happy with the approach in (1.) and (2.) and think we'll inevitably need something like this in the long-term, but (3.) seems like a hack to me. It's a *lot* of work to add tons of new calls to every user of these typeck results though (mir build, late lints, etc). Happy to discuss further.

r? `@lcnr`
  • Loading branch information
bors committed May 23, 2023
2 parents b053879 + afae8df commit 3ccee51
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 3ccee51

Please sign in to comment.