mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
FileCheck basic_assignment.rs.
This commit is contained in:
parent
00a7958e79
commit
f65eb1f752
@ -1,8 +1,8 @@
|
||||
// MIR for `main` after SimplifyCfg-initial
|
||||
|
||||
| User Type Annotations
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
|
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user