Only assume Stacked Borrows if -Zunsound-mir-opts is given
This commit is contained in:
parent
111324e17c
commit
3c0f3b04b5
7 changed files with 137 additions and 86 deletions
|
@ -1,8 +1,8 @@
|
|||
// unit-test: DataflowConstProp
|
||||
// compile-flags: -Zunsound-mir-opts
|
||||
|
||||
// EMIT_MIR if.main.DataflowConstProp.diff
|
||||
fn main() {
|
||||
// This does not work (yet). Needs perhaps additional state to track unreachability.
|
||||
let a = 1;
|
||||
let b = if *&a == 1 { 2 } else { 3 };
|
||||
let c = b + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue