]> git.lizzy.rs Git - rust.git/blobdiff - src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir
Rollup merge of #100184 - Kixunil:stabilize_ptr_const_cast, r=m-ou-se
[rust.git] / src / test / mir-opt / array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir
index c8848caa027091967a4f47839ed0cd91f6ac755e..27f883ed321ae658cd865ccae2c94111cfe9aab1 100644 (file)
@@ -1,22 +1,22 @@
 // MIR for `main` after SimplifyCfg-elaborate-drops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/array-index-is-temporary.rs:12:11: 12:11
-    let mut _1: [u32; 3];                // in scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
-    let mut _4: &mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:15:25: 15:31
-    let mut _5: u32;                     // in scope 0 at $DIR/array-index-is-temporary.rs:16:12: 16:29
-    let mut _6: *mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:16:25: 16:26
-    let _7: usize;                       // in scope 0 at $DIR/array-index-is-temporary.rs:16:7: 16:8
-    let mut _8: usize;                   // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
-    let mut _9: bool;                    // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
+    let mut _0: ();                      // return place in scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +0:11
+    let mut _1: [u32; 3];                // in scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
+    let mut _4: &mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
+    let mut _5: u32;                     // in scope 0 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
+    let mut _6: *mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
+    let _7: usize;                       // in scope 0 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
+    let mut _8: usize;                   // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
+    let mut _9: bool;                    // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
     scope 1 {
-        debug x => _1;                   // in scope 1 at $DIR/array-index-is-temporary.rs:13:9: 13:14
-        let mut _2: usize;               // in scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
+        debug x => _1;                   // in scope 1 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
+        let mut _2: usize;               // in scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
         scope 2 {
-            debug y => _2;               // in scope 2 at $DIR/array-index-is-temporary.rs:14:9: 14:14
-            let _3: *mut usize;          // in scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
+            debug y => _2;               // in scope 2 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
+            let _3: *mut usize;          // in scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
             scope 3 {
-                debug z => _3;           // in scope 3 at $DIR/array-index-is-temporary.rs:15:9: 15:10
+                debug z => _3;           // in scope 3 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
                 scope 4 {
                 }
             }
@@ -24,41 +24,41 @@ fn main() -> () {
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
-        _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
-        StorageLive(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
-        _2 = const 1_usize;              // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
-        StorageLive(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
-        StorageLive(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
-        _4 = &mut _2;                    // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
-        _3 = &raw mut (*_4);             // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
-        StorageDead(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32
-        StorageLive(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29
-        StorageLive(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
-        _6 = _3;                         // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
-        _5 = foo(move _6) -> bb1;        // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27
+        StorageLive(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
+        _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:+1:17: +1:29
+        StorageLive(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
+        _2 = const 1_usize;              // scope 1 at $DIR/array-index-is-temporary.rs:+2:17: +2:18
+        StorageLive(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
+        StorageLive(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
+        _4 = &mut _2;                    // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
+        _3 = &raw mut (*_4);             // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
+        StorageDead(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:31: +3:32
+        StorageLive(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
+        StorageLive(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
+        _6 = _3;                         // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
+        _5 = foo(move _6) -> bb1;        // scope 4 at $DIR/array-index-is-temporary.rs:+4:21: +4:27
                                          // mir::Constant
                                          // + span: $DIR/array-index-is-temporary.rs:16:21: 16:24
                                          // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27
-        StorageLive(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
-        _7 = _2;                         // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
-        _8 = Len(_1);                    // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
-        _9 = Lt(_7, _8);                 // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
-        assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
+        StorageDead(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:+4:26: +4:27
+        StorageLive(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
+        _7 = _2;                         // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
+        _8 = Len(_1);                    // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
+        _9 = Lt(_7, _8);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
+        assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
     }
 
     bb2: {
-        _1[_7] = move _5;                // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29
-        StorageDead(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29
-        StorageDead(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30
-        _0 = const ();                   // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2
-        StorageDead(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2
-        StorageDead(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2
-        StorageDead(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2
-        return;                          // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2
+        _1[_7] = move _5;                // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:29
+        StorageDead(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:28: +4:29
+        StorageDead(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:29: +4:30
+        _0 = const ();                   // scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +5:2
+        StorageDead(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
+        StorageDead(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
+        StorageDead(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/array-index-is-temporary.rs:+5:2: +5:2
     }
 }