Normalize struct tail type when checking Pointee trait by compiler-errors · Pull...
source link: https://github.com/rust-lang/rust/pull/92248
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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) and registered as an obligation... this turns out to be very important in unifying function parameters with formals that are assoc types.
Fixes #91446
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK