about summary refs log tree commit diff
path: root/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff
diff options
context:
space:
mode:
authorXavier Denis <xldenis@gmail.com>2022-06-10 14:12:58 -0700
committerXavier Denis <xldenis@gmail.com>2022-06-14 18:45:33 -0700
commita5e27a113445498b7b435bcd04e26ad1d71defab (patch)
tree629b3e110b53a77c72862e23ad5006a05fcb1514 /src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff
parente39c92e7aa2cd77659d504b05ad59e38388866f7 (diff)
downloadrust-a5e27a113445498b7b435bcd04e26ad1d71defab.tar.gz
rust-a5e27a113445498b7b435bcd04e26ad1d71defab.zip
Only create scopes for if let
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff')
-rw-r--r--src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff b/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff
index 3d7047b71d3..887c7b01f43 100644
--- a/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff
+++ b/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff
@@ -13,49 +13,47 @@
 -     let _8: usize;                       // in scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
 -     let mut _9: usize;                   // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
 -     let mut _10: bool;                   // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
+-     let mut _11: &[u8; N];               // in scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
 +     let _6: usize;                       // in scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
 +     let mut _7: usize;                   // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
 +     let mut _8: bool;                    // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
-      scope 1 {
--         let mut _11: &[u8; N];           // in scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
-      }
   
       bb0: {
-          StorageLive(_3);                 // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27
-          StorageLive(_4);                 // scope 1 at $DIR/lower_array_len.rs:7:8: 7:13
-          _4 = _1;                         // scope 1 at $DIR/lower_array_len.rs:7:8: 7:13
-          StorageLive(_5);                 // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageLive(_6);                 // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageLive(_7);                 // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageLive(_11);                // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageDead(_7);                 // scope 1 at $DIR/lower_array_len.rs:7:20: 7:21
-          _5 = const N;                    // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageDead(_11);                // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27
--         StorageDead(_6);                 // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27
-          _3 = Lt(move _4, move _5);       // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27
-          StorageDead(_5);                 // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27
-          StorageDead(_4);                 // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27
-          switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27
+          StorageLive(_3);                 // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27
+          StorageLive(_4);                 // scope 0 at $DIR/lower_array_len.rs:7:8: 7:13
+          _4 = _1;                         // scope 0 at $DIR/lower_array_len.rs:7:8: 7:13
+          StorageLive(_5);                 // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageLive(_6);                 // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageLive(_7);                 // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageLive(_11);                // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageDead(_7);                 // scope 0 at $DIR/lower_array_len.rs:7:20: 7:21
+          _5 = const N;                    // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageDead(_11);                // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27
+-         StorageDead(_6);                 // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27
+          _3 = Lt(move _4, move _5);       // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27
+          StorageDead(_5);                 // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27
+          StorageDead(_4);                 // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27
+          switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27
       }
   
       bb1: {
--         StorageLive(_8);                 // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20
--         _8 = _1;                         // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20
--         _9 = const N;                    // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
--         _10 = Lt(_8, _9);                // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
--         assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> bb2; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
-+         StorageLive(_6);                 // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20
-+         _6 = _1;                         // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20
-+         _7 = const N;                    // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
-+         _8 = Lt(_6, _7);                 // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
-+         assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb2; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
+-         StorageLive(_8);                 // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
+-         _8 = _1;                         // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
+-         _9 = const N;                    // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
+-         _10 = Lt(_8, _9);                // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
+-         assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> bb2; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
++         StorageLive(_6);                 // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
++         _6 = _1;                         // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20
++         _7 = const N;                    // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
++         _8 = Lt(_6, _7);                 // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
++         assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb2; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
       }
   
       bb2: {
--         _0 = (*_2)[_8];                  // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
--         StorageDead(_8);                 // scope 1 at $DIR/lower_array_len.rs:9:5: 9:6
-+         _0 = (*_2)[_6];                  // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21
-+         StorageDead(_6);                 // scope 1 at $DIR/lower_array_len.rs:9:5: 9:6
+-         _0 = (*_2)[_8];                  // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
+-         StorageDead(_8);                 // scope 0 at $DIR/lower_array_len.rs:9:5: 9:6
++         _0 = (*_2)[_6];                  // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21
++         StorageDead(_6);                 // scope 0 at $DIR/lower_array_len.rs:9:5: 9:6
           goto -> bb4;                     // scope 0 at $DIR/lower_array_len.rs:7:5: 11:6
       }