rust/compiler/rustc_mir_transform
Guillaume Gomez cfe1faa75d
Rollup merge of #123658 - compiler-errors:stop-assuming, r=oli-obk
Stop making any assumption about the projections applied to the upvars in the `ByMoveBody` pass

So it turns out that because of subtle optimizations like [`truncate_capture_for_optimization`](ab5bda1aa7/compiler/rustc_hir_typeck/src/upvar.rs (L2351)), we simply cannot make any assumptions about the shape of the projections applied to the upvar locals in a coroutine body.

So stop doing that -- the code is resilient to such projections, so the assertion really existed only to "protect against the unknown".

r? oli-obk
Fixes #123650
2024-04-09 13:39:23 +02:00
..
src Rollup merge of #123658 - compiler-errors:stop-assuming, r=oli-obk 2024-04-09 13:39:23 +02:00
Cargo.toml bump itertools to 0.12 2024-03-08 12:34:05 +03:00
messages.ftl Remove MIR unsafe check 2024-04-03 08:50:12 +00:00