mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 11:48:07 +00:00
don't do `Sized` and other return type checks on RPIT's real type Fixes an ICE where we're doing `Sized` check against the RPIT's real type, instead of against the opaque type. This differs from what we're doing in MIR typeck, which causes ICE #97226. This regressed in #96516 -- this adjusts that fix to be a bit more conservative. That PR was backported and thus the ICE is also present in stable. Not sure if it's worth to beta and/or stable backport, probably not the latter but I could believe the former. r? `@oli-obk` cc: another attempt to fix this ICE #97413. I believe this PR addresses the root cause.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.