diff options
| author | Xavier Denis <xldenis@gmail.com> | 2022-06-09 23:16:56 -0700 |
|---|---|---|
| committer | Xavier Denis <xldenis@gmail.com> | 2022-06-10 13:06:26 -0700 |
| commit | e39c92e7aa2cd77659d504b05ad59e38388866f7 (patch) | |
| tree | c0e5410f978d0cd6c86a738e6e9a463262df458e /src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff | |
| parent | cc75f0e5dab9e11056a177cf60d25586983a4050 (diff) | |
| download | rust-e39c92e7aa2cd77659d504b05ad59e38388866f7.tar.gz rust-e39c92e7aa2cd77659d504b05ad59e38388866f7.zip | |
Actually fix
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff')
| -rw-r--r-- | src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff b/src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff index d6c1c92cd91..d1cd3865da3 100644 --- a/src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff +++ b/src/test/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff @@ -13,45 +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 + scope 1 { ++ let mut _11: &[u8; N]; // in scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 + } bb0: { - 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 - _7 = &(*_2); // 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 -+ _11 = _7; // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 - _6 = move _7 as &[u8] (Pointer(Unsize)); // 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 = Len((*_6)); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 -+ _5 = Len((*_11)); // 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 - goto -> bb1; // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 + 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 + _7 = &(*_2); // 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 ++ _11 = _7; // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 + _6 = move _7 as &[u8] (Pointer(Unsize)); // 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 = Len((*_6)); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 ++ _5 = Len((*_11)); // 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 + goto -> bb1; // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 } bb1: { - 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: bb4, otherwise: bb2]; // scope 0 at $DIR/lower_array_len.rs:7:8: 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: bb4, otherwise: bb2]; // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27 } bb2: { - 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 = Len((*_2)); // 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) -> bb3; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 + 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 = Len((*_2)); // 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) -> bb3; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21 } bb3: { - _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)[_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 goto -> bb5; // scope 0 at $DIR/lower_array_len.rs:7:5: 11:6 } |
