rust/compiler/rustc_middle
Matthias Krüger bace7f986c
Rollup merge of #141703 - compiler-errors:deref-place, r=lcnr
Structurally normalize types as needed in `projection_ty_core`

Introduce a `structurally_normalize` callback to `projection_ty_core`, and then use it before we match on the ty kind in `projection_ty_core`.

Previously we were only structurally normalizing the return type of the `handle_field` struct, but if we were to (e.g.) apply a deref projection to that type, then the resulting type is not guaranteed to be structurally normalized and any subsequent projections applied would ICE.

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/221

I'll leave a few comments inline to explain the changes.

r? lcnr

---

Also fixes rust-lang/rust#141708
2025-05-30 13:39:52 +02:00
..
src Rollup merge of #141703 - compiler-errors:deref-place, r=lcnr 2025-05-30 13:39:52 +02:00
Cargo.toml Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
messages.ftl AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
README.md

For more information about how rustc works, see the rustc dev guide.