granite-rust/compiler/rustc_middle
Matthias Krüger 6466f89fc5
Rollup merge of #92248 - compiler-errors:normalize-type-for-pointee, r=jackh726
Normalize struct tail type when checking Pointee trait

Let's go ahead and implement the FIXMEs by properly normalizing the struct-tail type when satisfying a Pointee obligation. This should fix the ICE when we try to calculate a layout depending on `<Ty as Pointee>::Metadata` later.
Fixes #92128
Fixes #92577

Additionally, mark the obligation as ambiguous if there are any infer types in that struct-tail type. This has the effect of causing `<_ as Pointee>::Metadata` to be properly replaced with an infer variable ([here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_trait_selection/src/traits/project.rs#L813)) and registered as an obligation... this turns out to be very important in unifying function parameters with formals that are assoc types.

Fixes #91446
2022-01-10 11:03:03 +01:00
..
benches mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
src Rollup merge of #92248 - compiler-errors:normalize-type-for-pointee, r=jackh726 2022-01-10 11:03:03 +01:00
Cargo.toml revert #92254 "Bump gsgdt to 0.1.3" 2022-01-03 20:25:46 +01:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

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