diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-04-09 13:39:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-09 13:39:23 +0200 |
| commit | cfe1faa75df166f79482b9553253c104712aa9bd (patch) | |
| tree | 94df66f457fdf75005d4c81dd4bc548fc684f8ab /compiler/rustc_interface/src/interface.rs | |
| parent | b3f40e3448460a7dc5321948a049f43f23aada24 (diff) | |
| parent | 54a93ab11e183e25ba9addc50655cf16e2614329 (diff) | |
| download | rust-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
