about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/interface.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-04-09 13:39:23 +0200
committerGitHub <noreply@github.com>2024-04-09 13:39:23 +0200
commitcfe1faa75df166f79482b9553253c104712aa9bd (patch)
tree94df66f457fdf75005d4c81dd4bc548fc684f8ab /compiler/rustc_interface/src/interface.rs
parentb3f40e3448460a7dc5321948a049f43f23aada24 (diff)
parent54a93ab11e183e25ba9addc50655cf16e2614329 (diff)
downloadrust-cfe1faa75df166f79482b9553253c104712aa9bd.tar.gz
rust-cfe1faa75df166f79482b9553253c104712aa9bd.zip
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`](https://github.com/rust-lang/rust/blob/ab5bda1aa70f707014e2e691e43bc37a8819252a/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
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
0 files changed, 0 insertions, 0 deletions