Skip to content

Commit 4c3465c

Browse files
committed
run remaining tests
1 parent 8562d94 commit 4c3465c

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/test/mir-opt/const_prop/slice_len.main.ConstProp.32bit.diff

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
1313
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
1414
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
15+
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
1516

1617
bb0: {
1718
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
@@ -27,14 +28,16 @@
2728
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[6547]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) }
2829
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2930
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
31+
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
32+
_10 = _3; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3033
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3134
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
3235
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
3336
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
34-
- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
37+
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
38+
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3539
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3640
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
37-
+ _7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3841
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3942
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
4043
}

src/test/mir-opt/const_prop/slice_len.main.ConstProp.64bit.diff

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
1313
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
1414
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
15+
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
1516

1617
bb0: {
1718
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
@@ -27,14 +28,16 @@
2728
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[6547]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) }
2829
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2930
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
31+
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
32+
_10 = _3; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3033
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3134
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
3235
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
3336
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
34-
- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
37+
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
38+
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3539
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3640
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
37-
+ _7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3841
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
3942
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
4043
}

src/test/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff

+7-5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
let mut _20: *const T; // in scope 0 at $DIR/issue_76432.rs:9:70: 9:84
2323
let mut _21: *const T; // in scope 0 at $DIR/issue_76432.rs:9:70: 9:84
2424
let mut _22: !; // in scope 0 at $SRC_DIR/core/src/panic.rs:LL:COL
25+
let mut _23: &[T; 3]; // in scope 0 at $DIR/issue_76432.rs:7:19: 7:29
2526
scope 1 {
2627
debug v => _2; // in scope 1 at $DIR/issue_76432.rs:7:9: 7:10
2728
let _13: &T; // in scope 1 at $DIR/issue_76432.rs:9:10: 9:16
@@ -51,16 +52,17 @@
5152
StorageDead(_6); // scope 0 at $DIR/issue_76432.rs:7:28: 7:29
5253
_4 = &_5; // scope 0 at $DIR/issue_76432.rs:7:19: 7:29
5354
_3 = _4; // scope 0 at $DIR/issue_76432.rs:7:19: 7:29
55+
StorageLive(_23); // scope 0 at $DIR/issue_76432.rs:7:19: 7:29
56+
_23 = _3; // scope 0 at $DIR/issue_76432.rs:7:19: 7:29
5457
_2 = move _3 as &[T] (Pointer(Unsize)); // scope 0 at $DIR/issue_76432.rs:7:19: 7:29
5558
StorageDead(_3); // scope 0 at $DIR/issue_76432.rs:7:28: 7:29
5659
StorageDead(_4); // scope 0 at $DIR/issue_76432.rs:7:29: 7:30
5760
StorageLive(_9); // scope 1 at $DIR/issue_76432.rs:8:5: 11:6
58-
_10 = Len((*_2)); // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
61+
_10 = const 3_usize; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
62+
StorageDead(_23); // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
5963
_11 = const 3_usize; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
60-
- _12 = Eq(move _10, const 3_usize); // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
61-
- switchInt(move _12) -> [false: bb1, otherwise: bb2]; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
62-
+ nop; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
63-
+ switchInt(move _10) -> [3_usize: bb2, otherwise: bb1]; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
64+
_12 = const true; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
65+
goto -> bb2; // scope 1 at $DIR/issue_76432.rs:9:9: 9:33
6466
}
6567

6668
bb1: {

0 commit comments

Comments
 (0)