summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/basic_assignment.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/mir-opt/basic_assignment.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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;