rust/compiler/rustc_trait_selection
bors 4400d8fce7 Auto merge of #110204 - compiler-errors:new-solver-hir-typeck-hacks, 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`
2023-05-23 04:41:44 +00:00
..
src Auto merge of #110204 - compiler-errors:new-solver-hir-typeck-hacks, r=lcnr 2023-05-23 04:41:44 +00:00
Cargo.toml drop unused deps, gate libc under unix for one crate 2023-04-22 15:22:21 +03:00
messages.ftl IAT: Introduce AliasKind::Inherent 2023-05-04 16:59:10 +02:00