]> git.proxmox.com Git - rustc.git/blobdiff - src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir
New upstream version 1.45.0+dfsg1
[rustc.git] / src / test / mir-opt / issue-62289 / rustc.test.ElaborateDrops.before.mir
index 8970cc83f2b3c49b508fde73e6b521b3f9c3d627..0b8b03961f2a013e6f5d7edd9e43f22922a079fc 100644 (file)
@@ -24,13 +24,13 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
     }
 
     bb0: {
-        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21
-        StorageLive(_2);                 // bb0[1]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21
-        _2 = Box(u32);                   // bb0[2]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21
-        StorageLive(_3);                 // bb0[3]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20
-        StorageLive(_4);                 // bb0[4]: scope 0 at $DIR/issue-62289.rs:9:15: 9:19
-        _4 = std::option::Option::<u32>::None; // bb0[5]: scope 0 at $DIR/issue-62289.rs:9:15: 9:19
-        _3 = const <std::option::Option<u32> as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // bb0[6]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20
+        StorageLive(_1);                 // scope 0 at $DIR/issue-62289.rs:9:10: 9:21
+        StorageLive(_2);                 // scope 0 at $DIR/issue-62289.rs:9:10: 9:21
+        _2 = Box(u32);                   // scope 0 at $DIR/issue-62289.rs:9:10: 9:21
+        StorageLive(_3);                 // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
+        StorageLive(_4);                 // scope 0 at $DIR/issue-62289.rs:9:15: 9:19
+        _4 = std::option::Option::<u32>::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19
+        _3 = const <std::option::Option<u32> as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
                                          // ty::Const
                                          // + ty: fn(std::option::Option<u32>) -> std::result::Result<<std::option::Option<u32> as std::ops::Try>::Ok, <std::option::Option<u32> as std::ops::Try>::Error> {<std::option::Option<u32> as std::ops::Try>::into_result}
                                          // + val: Value(Scalar(<ZST>))
@@ -40,39 +40,39 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
     }
 
     bb1 (cleanup): {
-        resume;                          // bb1[0]: scope 0 at $DIR/issue-62289.rs:8:1: 10:2
+        resume;                          // scope 0 at $DIR/issue-62289.rs:8:1: 10:2
     }
 
     bb2: {
-        StorageDead(_4);                 // bb2[0]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        _5 = discriminant(_3);           // bb2[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        switchInt(move _5) -> [0isize: bb4, 1isize: bb6, otherwise: bb5]; // bb2[2]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageDead(_4);                 // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        _5 = discriminant(_3);           // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        switchInt(move _5) -> [0isize: bb4, 1isize: bb6, otherwise: bb5]; // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
     }
 
     bb3 (cleanup): {
-        drop(_2) -> bb1;                 // bb3[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21
+        drop(_2) -> bb1;                 // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
     }
 
     bb4: {
-        StorageLive(_10);                // bb4[0]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20
-        _10 = ((_3 as Ok).0: u32);       // bb4[1]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20
-        (*_2) = _10;                     // bb4[2]: scope 4 at $DIR/issue-62289.rs:9:15: 9:20
-        StorageDead(_10);                // bb4[3]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        _1 = move _2;                    // bb4[4]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21
-        drop(_2) -> [return: bb12, unwind: bb11]; // bb4[5]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21
+        StorageLive(_10);                // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
+        _10 = ((_3 as Ok).0: u32);       // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
+        (*_2) = _10;                     // scope 4 at $DIR/issue-62289.rs:9:15: 9:20
+        StorageDead(_10);                // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        _1 = move _2;                    // scope 0 at $DIR/issue-62289.rs:9:10: 9:21
+        drop(_2) -> [return: bb12, unwind: bb11]; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
     }
 
     bb5: {
-        unreachable;                     // bb5[0]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20
+        unreachable;                     // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
     }
 
     bb6: {
-        StorageLive(_6);                 // bb6[0]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        _6 = ((_3 as Err).0: std::option::NoneError); // bb6[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        StorageLive(_8);                 // bb6[2]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
-        StorageLive(_9);                 // bb6[3]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
-        _9 = _6;                         // bb6[4]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
-        _8 = const <std::option::NoneError as std::convert::From<std::option::NoneError>>::from(move _9) -> [return: bb8, unwind: bb3]; // bb6[5]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageLive(_6);                 // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        _6 = ((_3 as Err).0: std::option::NoneError); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageLive(_8);                 // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageLive(_9);                 // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        _9 = _6;                         // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        _8 = const <std::option::NoneError as std::convert::From<std::option::NoneError>>::from(move _9) -> [return: bb8, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
                                          // ty::Const
                                          // + ty: fn(std::option::NoneError) -> std::option::NoneError {<std::option::NoneError as std::convert::From<std::option::NoneError>>::from}
                                          // + val: Value(Scalar(<ZST>))
@@ -82,12 +82,12 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
     }
 
     bb7: {
-        return;                          // bb7[0]: scope 0 at $DIR/issue-62289.rs:10:2: 10:2
+        return;                          // scope 0 at $DIR/issue-62289.rs:10:2: 10:2
     }
 
     bb8: {
-        StorageDead(_9);                 // bb8[0]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
-        _0 = const <std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // bb8[1]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageDead(_9);                 // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        _0 = const <std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
                                          // ty::Const
                                          // + ty: fn(<std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::Error) -> std::option::Option<std::boxed::Box<u32>> {<std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error}
                                          // + val: Value(Scalar(<ZST>))
@@ -97,31 +97,31 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
     }
 
     bb9: {
-        StorageDead(_8);                 // bb9[0]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20
-        StorageDead(_6);                 // bb9[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
-        drop(_2) -> bb10;                // bb9[2]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21
+        StorageDead(_8);                 // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageDead(_6);                 // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        drop(_2) -> bb10;                // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
     }
 
     bb10: {
-        StorageDead(_2);                 // bb10[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21
-        StorageDead(_1);                 // bb10[1]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22
-        StorageDead(_3);                 // bb10[2]: scope 0 at $DIR/issue-62289.rs:10:1: 10:2
-        goto -> bb7;                     // bb10[3]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20
+        StorageDead(_2);                 // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
+        StorageDead(_1);                 // scope 0 at $DIR/issue-62289.rs:9:21: 9:22
+        StorageDead(_3);                 // scope 0 at $DIR/issue-62289.rs:10:1: 10:2
+        goto -> bb7;                     // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
     }
 
     bb11 (cleanup): {
-        drop(_1) -> bb1;                 // bb11[0]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22
+        drop(_1) -> bb1;                 // scope 0 at $DIR/issue-62289.rs:9:21: 9:22
     }
 
     bb12: {
-        StorageDead(_2);                 // bb12[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21
-        _0 = std::option::Option::<std::boxed::Box<u32>>::Some(move _1); // bb12[1]: scope 0 at $DIR/issue-62289.rs:9:5: 9:22
-        drop(_1) -> bb13;                // bb12[2]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22
+        StorageDead(_2);                 // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
+        _0 = std::option::Option::<std::boxed::Box<u32>>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5: 9:22
+        drop(_1) -> bb13;                // scope 0 at $DIR/issue-62289.rs:9:21: 9:22
     }
 
     bb13: {
-        StorageDead(_1);                 // bb13[0]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22
-        StorageDead(_3);                 // bb13[1]: scope 0 at $DIR/issue-62289.rs:10:1: 10:2
-        goto -> bb7;                     // bb13[2]: scope 0 at $DIR/issue-62289.rs:10:2: 10:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue-62289.rs:9:21: 9:22
+        StorageDead(_3);                 // scope 0 at $DIR/issue-62289.rs:10:1: 10:2
+        goto -> bb7;                     // scope 0 at $DIR/issue-62289.rs:10:2: 10:2
     }
 }