Skip to content

Commit 19ce326

Browse files
committed
Bless tests
1 parent c462291 commit 19ce326

File tree

168 files changed

+344
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+344
-344
lines changed

tests/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.panic-unwind.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn main() -> () {
3636
StorageLive(_5);
3737
StorageLive(_6);
3838
_6 = _3;
39-
_5 = foo(move _6) -> bb1;
39+
_5 = foo(move _6) -> [return: bb1, unwind continue];
4040
}
4141

4242
bb1: {
@@ -45,7 +45,7 @@ fn main() -> () {
4545
_7 = _2;
4646
_8 = Len(_1);
4747
_9 = Lt(_7, _8);
48-
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2;
48+
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind continue];
4949
}
5050

5151
bb2: {

tests/mir-opt/basic_assignment.main.ElaborateDrops.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
bb4: {
6060
StorageDead(_5);
61-
- drop(_4) -> bb5;
61+
- drop(_4) -> [return: bb5, unwind continue];
6262
+ goto -> bb5;
6363
}
6464

tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() -> () {
1919
StorageLive(_1);
2020
_2 = SizeOf(S);
2121
_3 = AlignOf(S);
22-
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1;
22+
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
2323
}
2424

2525
bb1: {
@@ -30,7 +30,7 @@ fn main() -> () {
3030

3131
bb2: {
3232
_1 = move _5;
33-
drop(_5) -> bb3;
33+
drop(_5) -> [return: bb3, unwind continue];
3434
}
3535

3636
bb3: {
@@ -45,7 +45,7 @@ fn main() -> () {
4545
StorageDead(_7);
4646
StorageDead(_6);
4747
_0 = const ();
48-
drop(_1) -> bb5;
48+
drop(_1) -> [return: bb5, unwind continue];
4949
}
5050

5151
bb5: {

tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn a::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:11:14: 11:16]>
3030
}
3131

3232
bb2: {
33-
assert(const false, "`async fn` resumed after completion") -> bb2;
33+
assert(const false, "`async fn` resumed after completion") -> [success: bb2, unwind continue];
3434
}
3535

3636
bb3: {

tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
310310
}
311311

312312
bb28: {
313-
assert(const false, "`async fn` resumed after completion") -> bb28;
313+
assert(const false, "`async fn` resumed after completion") -> [success: bb28, unwind continue];
314314
}
315315

316316
bb29: {

tests/mir-opt/building/custom/terminators.direct_call.built.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn direct_call(_1: i32) -> i32 {
44
let mut _0: i32;
55

66
bb0: {
7-
_0 = ident::<i32>(_1) -> bb1;
7+
_0 = ident::<i32>(_1) -> [return: bb1, unwind continue];
88
}
99

1010
bb1: {

tests/mir-opt/building/custom/terminators.drop_first.built.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn drop_first(_1: WriteOnDrop<'_>, _2: WriteOnDrop<'_>) -> () {
44
let mut _0: ();
55

66
bb0: {
7-
drop(_1) -> bb1;
7+
drop(_1) -> [return: bb1, unwind continue];
88
}
99

1010
bb1: {

tests/mir-opt/building/custom/terminators.drop_second.built.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn drop_second(_1: WriteOnDrop<'_>, _2: WriteOnDrop<'_>) -> () {
44
let mut _0: ();
55

66
bb0: {
7-
drop(_2) -> bb1;
7+
drop(_2) -> [return: bb1, unwind continue];
88
}
99

1010
bb1: {

tests/mir-opt/building/custom/terminators.indirect_call.built.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn indirect_call(_1: i32, _2: fn(i32) -> i32) -> i32 {
44
let mut _0: i32;
55

66
bb0: {
7-
_0 = _2(_1) -> bb1;
7+
_0 = _2(_1) -> [return: bb1, unwind continue];
88
}
99

1010
bb1: {

tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- _4 = Len(_1);
3333
+ _4 = const 2_usize;
3434
_5 = Lt(_3, _4);
35-
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
35+
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
3636
}
3737

3838
bb1: {
@@ -44,7 +44,7 @@
4444
- _8 = Len(_1);
4545
+ _8 = const 2_usize;
4646
_9 = Lt(_7, _8);
47-
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2;
47+
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind continue];
4848
}
4949

5050
bb2: {

tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
_4 = &((*_1).0: T);
2222
- _3 = &(*_4);
2323
+ _3 = _4;
24-
_2 = <T as Clone>::clone(move _3) -> bb1;
24+
_2 = <T as Clone>::clone(move _3) -> [return: bb1, unwind continue];
2525
}
2626

2727
bb1: {

tests/mir-opt/const_prop/aggregate.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
StorageLive(_5);
2828
- _5 = _1;
2929
+ _5 = const 1_u8;
30-
_4 = foo(move _5) -> bb1;
30+
_4 = foo(move _5) -> [return: bb1, unwind continue];
3131
}
3232

3333
bb1: {

tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-unwind.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() -> () {
2323
StorageLive(_4);
2424
StorageLive(_5);
2525
_5 = const 1_u8;
26-
_4 = foo(move _5) -> bb1;
26+
_4 = foo(move _5) -> [return: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/array_index.main.ConstProp.32bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
_3 = const 2_usize;
2121
- _4 = Len(_2);
2222
- _5 = Lt(_3, _4);
23-
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
23+
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2424
+ _4 = const 4_usize;
2525
+ _5 = const true;
26-
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
26+
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/array_index.main.ConstProp.64bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
_3 = const 2_usize;
2121
- _4 = Len(_2);
2222
- _5 = Lt(_3, _4);
23-
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
23+
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2424
+ _4 = const 4_usize;
2525
+ _5 = const true;
26-
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
26+
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.panic-unwind.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424
StorageLive(_3);
2525
- _3 = _1;
2626
- _4 = Eq(_3, const 0_i32);
27-
- assert(!move _4, "attempt to divide `{}` by zero", const 1_i32) -> bb1;
27+
- assert(!move _4, "attempt to divide `{}` by zero", const 1_i32) -> [success: bb1, unwind continue];
2828
+ _3 = const 0_i32;
2929
+ _4 = const true;
30-
+ assert(!const true, "attempt to divide `{}` by zero", const 1_i32) -> bb1;
30+
+ assert(!const true, "attempt to divide `{}` by zero", const 1_i32) -> [success: bb1, unwind continue];
3131
}
3232

3333
bb1: {
3434
- _5 = Eq(_3, const -1_i32);
3535
- _6 = Eq(const 1_i32, const i32::MIN);
3636
- _7 = BitAnd(move _5, move _6);
37-
- assert(!move _7, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> bb2;
37+
- assert(!move _7, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> [success: bb2, unwind continue];
3838
+ _5 = const false;
3939
+ _6 = const false;
4040
+ _7 = const false;
41-
+ assert(!const false, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> bb2;
41+
+ assert(!const false, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> [success: bb2, unwind continue];
4242
}
4343

4444
bb2: {

tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.panic-unwind.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424
StorageLive(_3);
2525
- _3 = _1;
2626
- _4 = Eq(_3, const 0_i32);
27-
- assert(!move _4, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1;
27+
- assert(!move _4, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> [success: bb1, unwind continue];
2828
+ _3 = const 0_i32;
2929
+ _4 = const true;
30-
+ assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1;
30+
+ assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> [success: bb1, unwind continue];
3131
}
3232

3333
bb1: {
3434
- _5 = Eq(_3, const -1_i32);
3535
- _6 = Eq(const 1_i32, const i32::MIN);
3636
- _7 = BitAnd(move _5, move _6);
37-
- assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2;
37+
- assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> [success: bb2, unwind continue];
3838
+ _5 = const false;
3939
+ _6 = const false;
4040
+ _7 = const false;
41-
+ assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2;
41+
+ assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> [success: bb2, unwind continue];
4242
}
4343

4444
bb2: {

tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
_6 = const 3_usize;
3737
_7 = const 3_usize;
3838
- _8 = Lt(_6, _7);
39-
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1;
39+
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb1, unwind continue];
4040
+ _8 = const false;
41-
+ assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1;
41+
+ assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb1, unwind continue];
4242
}
4343

4444
bb1: {

tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
_6 = const 3_usize;
3737
_7 = const 3_usize;
3838
- _8 = Lt(_6, _7);
39-
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1;
39+
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb1, unwind continue];
4040
+ _8 = const false;
41-
+ assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1;
41+
+ assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb1, unwind continue];
4242
}
4343

4444
bb1: {

tests/mir-opt/const_prop/boxes.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- _5 = AlignOf(i32);
2727
+ _4 = const 4_usize;
2828
+ _5 = const 4_usize;
29-
_6 = alloc::alloc::exchange_malloc(move _4, move _5) -> bb1;
29+
_6 = alloc::alloc::exchange_malloc(move _4, move _5) -> [return: bb1, unwind continue];
3030
}
3131

3232
bb1: {

tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
bb0: {
1313
StorageLive(_1);
1414
- _2 = CheckedAdd(const 1_u32, const 1_u32);
15-
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1;
15+
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> [success: bb1, unwind continue];
1616
+ _2 = const (2_u32, false);
17-
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1;
17+
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> [success: bb1, unwind continue];
1818
}
1919

2020
bb1: {

tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
StorageLive(_4);
2525
StorageLive(_5);
2626
_5 = _1;
27-
_4 = read(move _5) -> bb1;
27+
_4 = read(move _5) -> [return: bb1, unwind continue];
2828
}
2929

3030
bb1: {

tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515

1616
bb1: {
17-
_2 = begin_panic::<&str>(const "explicit panic");
17+
_2 = begin_panic::<&str>(const "explicit panic") -> unwind continue;
1818
}
1919

2020
bb2: {

tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
StorageLive(_2);
1616
- _2 = const 2_u32 as u8 (IntToInt);
1717
- _3 = CheckedAdd(_2, const 1_u8);
18-
- assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> bb1;
18+
- assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> [success: bb1, unwind continue];
1919
+ _2 = const 2_u8;
2020
+ _3 = const (3_u8, false);
21-
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> bb1;
21+
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> [success: bb1, unwind continue];
2222
}
2323

2424
bb1: {

tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
StorageLive(_3);
2222
_3 = const 1_u8;
2323
- _4 = CheckedAdd(_2, _3);
24-
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> bb1;
24+
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
2525
+ _4 = const (0_u8, true);
26-
+ assert(!const true, "attempt to compute `{} + {}`, which would overflow", _2, _3) -> bb1;
26+
+ assert(!const true, "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
bb0: {
1010
StorageLive(_2);
1111
_2 = (const (), const 0_u8, const 0_u8);
12-
_1 = encode(move _2) -> bb1;
12+
_1 = encode(move _2) -> [return: bb1, unwind continue];
1313
}
1414

1515
bb1: {

tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
+ _3 = const (1_u8, 2_u8);
1515
_2 = (move _3,);
1616
StorageDead(_3);
17-
_1 = test(move _2) -> bb1;
17+
_1 = test(move _2) -> [return: bb1, unwind continue];
1818
}
1919

2020
bb1: {

tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
_3 = const 2_usize;
2121
- _4 = Len(_2);
2222
- _5 = Lt(_3, _4);
23-
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
23+
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2424
+ _4 = const 5000_usize;
2525
+ _5 = const true;
26-
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
26+
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.panic-unwind.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
_3 = const 2_usize;
2121
- _4 = Len(_2);
2222
- _5 = Lt(_3, _4);
23-
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
23+
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2424
+ _4 = const 5000_usize;
2525
+ _5 = const true;
26-
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
26+
+ assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind continue];
2727
}
2828

2929
bb1: {

tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
bb0: {
1616
StorageLive(_1);
17-
_1 = foo() -> bb1;
17+
_1 = foo() -> [return: bb1, unwind continue];
1818
}
1919

2020
bb1: {

tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
bb0: {
2525
StorageLive(_1);
26-
_1 = foo() -> bb1;
26+
_1 = foo() -> [return: bb1, unwind continue];
2727
}
2828

2929
bb1: {

0 commit comments

Comments
 (0)