rust/compiler/rustc_mir_transform
Matthias Krüger 6917040cf0
Rollup merge of #107524 - cjgillot:both-storage, r=RalfJung
Remove both StorageLive and StorageDead in CopyProp.

Fixes https://github.com/rust-lang/rust/issues/107511

https://github.com/rust-lang/rust/pull/106908 removed StorageDead without the accompanying StorageLive. In loops, execution would see repeated StorageLive, without any StorageDead, which is UB.

So when removing storage statements, we have to remove both StorageLive and StorageDead.

~I also added a MIR validation pass for StorageLive. It may be a bit overzealous.~
2023-02-02 17:14:06 +01:00
..
src Rollup merge of #107524 - cjgillot:both-storage, r=RalfJung 2023-02-02 17:14:06 +01:00
Cargo.toml interpret: use Either over Result when it is not representing an error condition 2022-11-18 10:18:32 +01:00