diff --git a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir index 99b51a4e92f..5df6633880e 100644 --- a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir +++ b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir @@ -1,8 +1,8 @@ // MIR for `main` after SimplifyCfg-initial | User Type Annotations -| 0: user_ty: Canonical { value: Ty(std::option::Option>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option> -| 1: user_ty: Canonical { value: Ty(std::option::Option>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option> +| 0: user_ty: Canonical { value: Ty(std::option::Option>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option> +| 1: user_ty: Canonical { value: Ty(std::option::Option>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option> | fn main() -> () { let mut _0: (); diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs index 87e01932cb1..30a41098888 100644 --- a/tests/mir-opt/basic_assignment.rs +++ b/tests/mir-opt/basic_assignment.rs @@ -1,4 +1,4 @@ -// skip-filecheck +// unit-test: ElaborateDrops // needs-unwind // this tests move up progration, which is not yet implemented @@ -11,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;