We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7670ae1 commit 1e19af5Copy full SHA for 1e19af5
tests/mir-opt/copy-prop/cycle.rs
@@ -1,4 +1,3 @@
1
-// skip-filecheck
2
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
//! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
4
//@ test-mir-pass: CopyProp
@@ -8,6 +7,16 @@ fn val() -> i32 {
8
7
9
// EMIT_MIR cycle.main.CopyProp.diff
10
fn main() {
+ // CHECK-LABEL: fn main(
11
+ // CHECK: debug z => _2;
12
+ // CHECK-NOT: StorageLive(_2);
13
+ // CHECK: _2 = copy _1;
14
+ // CHECK-NOT: StorageLive(_3);
15
+ // CHECK-NOT: _3 = copy _2;
16
+ // CHECK-NOT: StorageLive(_4);
17
+ // CHECK-NOT: _4 = copy _3;
18
+ // CHECK-NOT: _1 = move _4;
19
+ // CHECK: _1 = copy _2;
20
let mut x = val();
21
let y = x;
22
let z = y;
0 commit comments