summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/basic_assignment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/basic_assignment.rs')
-rw-r--r--tests/mir-opt/basic_assignment.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs
index 92434e44a..30a410988 100644
--- a/tests/mir-opt/basic_assignment.rs
+++ b/tests/mir-opt/basic_assignment.rs
@@ -1,3 +1,4 @@
+// unit-test: ElaborateDrops
// needs-unwind
// this tests move up progration, which is not yet implemented
@@ -10,6 +11,23 @@
// destruction.
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug nodrop_x => [[nodrop_x:_.*]];
+ // CHECK: debug nodrop_y => [[nodrop_y:_.*]];
+ // CHECK: debug drop_x => [[drop_x:_.*]];
+ // CHECK: debug drop_y => [[drop_y:_.*]];
+ // CHECK-NOT: drop([[nodrop_x]])
+ // CHECK-NOT: drop([[nodrop_y]])
+ // CHECK-NOT: drop([[drop_x]])
+ // CHECK: [[drop_tmp:_.*]] = move [[drop_x]];
+ // CHECK-NOT: drop([[drop_x]])
+ // CHECK-NOT: drop([[drop_tmp]])
+ // CHECK: [[drop_y]] = move [[drop_tmp]];
+ // CHECK-NOT: drop([[drop_x]])
+ // CHECK-NOT: drop([[drop_tmp]])
+ // CHECK: drop([[drop_y]])
+ // CHECK-NOT: drop([[drop_x]])
+ // CHECK-NOT: drop([[drop_tmp]])
let nodrop_x = false;
let nodrop_y;