Skip to content

Commit 2a9d710

Browse files
committed
Bless tests
1 parent c5829c2 commit 2a9d710

File tree

82 files changed

+185
-177
lines changed

Some content is hidden

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

82 files changed

+185
-177
lines changed

src/tools/miri/tests/fail/abort-terminator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(c_unwind)]
22

33
extern "C" fn panic_abort() {
4-
//~^ ERROR: the program aborted
4+
//~^ ERROR: panic in a function that cannot unwind
55
panic!()
66
}
77

src/tools/miri/tests/fail/abort-terminator.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
thread 'main' panicked at 'explicit panic', $DIR/abort-terminator.rs:LL:CC
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3-
error: abnormal termination: the program aborted execution
3+
error: abnormal termination: panic in a function that cannot unwind
44
--> $DIR/abort-terminator.rs:LL:CC
55
|
66
LL | / extern "C" fn panic_abort() {
77
LL | |
88
LL | | panic!()
99
LL | | }
10-
| |_^ the program aborted execution
10+
| |_^ panic in a function that cannot unwind
1111
|
1212
= note: inside `panic_abort` at $DIR/abort-terminator.rs:LL:CC
1313
note: inside `main`

src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_bad_unwind2.rs:LL:CC
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3-
error: abnormal termination: the program aborted execution
3+
error: abnormal termination: panic in a function that cannot unwind
44
--> $DIR/exported_symbol_bad_unwind2.rs:LL:CC
55
|
66
LL | / extern "C-unwind" fn nounwind() {
77
LL | |
88
LL | |
99
LL | | panic!();
1010
LL | | }
11-
| |_^ the program aborted execution
11+
| |_^ panic in a function that cannot unwind
1212
|
1313
= note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
1414
note: inside `main`

src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_bad_unwind2.rs:LL:CC
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3-
error: abnormal termination: the program aborted execution
3+
error: abnormal termination: panic in a function that cannot unwind
44
--> $DIR/exported_symbol_bad_unwind2.rs:LL:CC
55
|
66
LL | / extern "C-unwind" fn nounwind() {
77
LL | |
88
LL | |
99
LL | | panic!();
1010
LL | | }
11-
| |_^ the program aborted execution
11+
| |_^ panic in a function that cannot unwind
1212
|
1313
= note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
1414
note: inside `main`

src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#[cfg_attr(any(definition, both), rustc_nounwind)]
55
#[no_mangle]
66
extern "C-unwind" fn nounwind() {
7-
//~[definition]^ ERROR: abnormal termination: the program aborted execution
8-
//~[both]^^ ERROR: abnormal termination: the program aborted execution
7+
//~[definition]^ ERROR: abnormal termination: panic in a function that cannot unwind
8+
//~[both]^^ ERROR: abnormal termination: panic in a function that cannot unwind
99
panic!();
1010
}
1111

tests/mir-opt/asm_unwind_panic_abort.main.AbortUnwindingCalls.after.mir

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,12 @@ fn main() -> () {
99
bb0: {
1010
StorageLive(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
1111
_1 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
12-
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind: bb2]; // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
12+
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind terminate]; // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
1313
}
1414

1515
bb1: {
1616
StorageDead(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:48: +2:49
1717
_0 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+1:5: +3:6
1818
return; // scope 0 at $DIR/asm_unwind_panic_abort.rs:+4:2: +4:2
1919
}
20-
21-
bb2 (cleanup): {
22-
abort; // scope 0 at $DIR/asm_unwind_panic_abort.rs:+0:1: +4:2
23-
}
2420
}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
bb2 (cleanup): {
4949
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
50-
drop(_6) -> bb6; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
50+
drop(_6) -> [return: bb6, unwind terminate]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
5151
}
5252

5353
bb3: {
@@ -70,16 +70,20 @@
7070
}
7171

7272
bb6 (cleanup): {
73-
drop(_5) -> bb7; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
73+
drop(_5) -> [return: bb7, unwind terminate]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
7474
}
7575

7676
bb7 (cleanup): {
77-
- drop(_4) -> bb8; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
77+
- drop(_4) -> [return: bb8, unwind terminate]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
7878
+ goto -> bb8; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
7979
}
8080

8181
bb8 (cleanup): {
8282
resume; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
83+
+ }
84+
+
85+
+ bb9 (cleanup): {
86+
+ unreachable; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
8387
}
8488
}
8589

tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn main() -> () {
5151

5252
bb2 (cleanup): {
5353
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
54-
drop(_6) -> bb6; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
54+
drop(_6) -> [return: bb6, unwind terminate]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
5555
}
5656

5757
bb3: {
@@ -73,11 +73,11 @@ fn main() -> () {
7373
}
7474

7575
bb6 (cleanup): {
76-
drop(_5) -> bb7; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
76+
drop(_5) -> [return: bb7, unwind terminate]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
7777
}
7878

7979
bb7 (cleanup): {
80-
drop(_4) -> bb8; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
80+
drop(_4) -> [return: bb8, unwind terminate]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
8181
}
8282

8383
bb8 (cleanup): {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ fn main() -> () {
6363
}
6464

6565
bb6 (cleanup): {
66-
drop(_7) -> bb7; // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
66+
drop(_7) -> [return: bb7, unwind terminate]; // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
6767
}
6868

6969
bb7 (cleanup): {
70-
drop(_1) -> bb9; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
70+
drop(_1) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
7171
}
7272

7373
bb8 (cleanup): {
74-
drop(_5) -> bb9; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
74+
drop(_5) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
7575
}
7676

7777
bb9 (cleanup): {

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
9898
StorageLive(_3); // scope 0 at $DIR/async_await.rs:+1:5: +1:14
9999
StorageLive(_4); // scope 0 at $DIR/async_await.rs:+1:8: +1:14
100100
StorageLive(_5); // scope 0 at $DIR/async_await.rs:+1:5: +1:8
101-
_5 = a() -> bb2; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
101+
_5 = a() -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
102102
// mir::Constant
103103
// + span: $DIR/async_await.rs:15:5: 15:6
104104
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
105105
}
106106

107107
bb2: {
108-
_4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> bb3; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
108+
_4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
109109
// mir::Constant
110110
// + span: $DIR/async_await.rs:15:8: 15:14
111111
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
@@ -126,7 +126,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
126126
StorageLive(_12); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
127127
_12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
128128
_11 = &mut (*_12); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
129-
_10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> bb5; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
129+
_10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
130130
// mir::Constant
131131
// + span: $DIR/async_await.rs:15:8: 15:14
132132
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
@@ -145,7 +145,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
145145
bb6: {
146146
_13 = &mut (*_14); // scope 2 at $DIR/async_await.rs:+1:5: +1:14
147147
StorageDead(_15); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
148-
_9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> bb7; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
148+
_9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
149149
// mir::Constant
150150
// + span: $DIR/async_await.rs:15:8: 15:14
151151
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
@@ -206,14 +206,14 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
206206
StorageDead(_3); // scope 0 at $DIR/async_await.rs:+1:14: +1:15
207207
StorageLive(_21); // scope 0 at $DIR/async_await.rs:+2:8: +2:14
208208
StorageLive(_22); // scope 0 at $DIR/async_await.rs:+2:5: +2:8
209-
_22 = a() -> bb14; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
209+
_22 = a() -> [return: bb14, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
210210
// mir::Constant
211211
// + span: $DIR/async_await.rs:16:5: 16:6
212212
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
213213
}
214214

215215
bb14: {
216-
_21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> bb15; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
216+
_21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
217217
// mir::Constant
218218
// + span: $DIR/async_await.rs:16:8: 16:14
219219
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
@@ -234,7 +234,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
234234
StorageLive(_28); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
235235
_28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
236236
_27 = &mut (*_28); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
237-
_26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> bb17; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
237+
_26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
238238
// mir::Constant
239239
// + span: $DIR/async_await.rs:16:8: 16:14
240240
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
@@ -253,7 +253,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
253253
bb18: {
254254
_29 = &mut (*_30); // scope 5 at $DIR/async_await.rs:+2:5: +2:14
255255
StorageDead(_31); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
256-
_25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> bb19; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
256+
_25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
257257
// mir::Constant
258258
// + span: $DIR/async_await.rs:16:8: 16:14
259259
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }

tests/mir-opt/building/enum_cast.droppy.built.after.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn droppy() -> () {
6363
}
6464

6565
bb4 (cleanup): {
66-
drop(_2) -> bb5; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
66+
drop(_2) -> [return: bb5, unwind terminate]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
6767
}
6868

6969
bb5 (cleanup): {

tests/mir-opt/building/issue_49232.main.built.after.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() -> () {
1717
}
1818

1919
bb1: {
20-
falseUnwind -> [real: bb2, cleanup: bb11]; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
20+
falseUnwind -> [real: bb2, unwind: bb11]; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
2121
}
2222

2323
bb2: {

tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ fn move_out_by_subslice() -> () {
9595
}
9696

9797
bb9 (cleanup): {
98-
drop(_1) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
98+
drop(_1) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
9999
}
100100

101101
bb10 (cleanup): {
102-
drop(_7) -> bb11; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
102+
drop(_7) -> [return: bb11, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
103103
}
104104

105105
bb11 (cleanup): {
106-
drop(_2) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
106+
drop(_2) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
107107
}
108108

109109
bb12 (cleanup): {

tests/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ fn move_out_from_end() -> () {
9595
}
9696

9797
bb9 (cleanup): {
98-
drop(_1) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
98+
drop(_1) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
9999
}
100100

101101
bb10 (cleanup): {
102-
drop(_7) -> bb11; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
102+
drop(_7) -> [return: bb11, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
103103
}
104104

105105
bb11 (cleanup): {
106-
drop(_2) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
106+
drop(_2) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
107107
}
108108

109109
bb12 (cleanup): {

tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
}
7373

7474
bb4 (cleanup): {
75-
drop(_2) -> bb5; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
75+
drop(_2) -> [return: bb5, unwind terminate]; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
7676
}
7777

7878
bb5 (cleanup): {

tests/mir-opt/combine_transmutes.adt_transmutes.InstCombine.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
StorageDead(_22); // scope 10 at $DIR/combine_transmutes.rs:+11:47: +11:48
129129
StorageLive(_23); // scope 11 at $DIR/combine_transmutes.rs:+12:9: +12:11
130130
StorageLive(_24); // scope 11 at $DIR/combine_transmutes.rs:+12:46: +12:77
131-
_24 = MaybeUninit::<String>::uninit() -> bb1; // scope 11 at $DIR/combine_transmutes.rs:+12:46: +12:77
131+
_24 = MaybeUninit::<String>::uninit() -> [return: bb1, unwind unreachable]; // scope 11 at $DIR/combine_transmutes.rs:+12:46: +12:77
132132
// mir::Constant
133133
// + span: $DIR/combine_transmutes.rs:46:46: 46:75
134134
// + user_ty: UserType(23)

tests/mir-opt/combine_transmutes.identity_transmutes.InstCombine.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
+ _1 = const 1_i32; // scope 0 at $DIR/combine_transmutes.rs:+2:14: +2:38
2020
StorageLive(_2); // scope 1 at $DIR/combine_transmutes.rs:+3:9: +3:11
2121
StorageLive(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56
22-
_3 = Vec::<i32>::new() -> bb1; // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56
22+
_3 = Vec::<i32>::new() -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56
2323
// mir::Constant
2424
// + span: $DIR/combine_transmutes.rs:15:46: 15:54
2525
// + user_ty: UserType(0)
@@ -31,7 +31,7 @@
3131
+ _2 = move _3; // scope 1 at $DIR/combine_transmutes.rs:+3:14: +3:57
3232
StorageDead(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:56: +3:57
3333
_0 = const (); // scope 0 at $DIR/combine_transmutes.rs:+0:37: +4:2
34-
drop(_2) -> bb2; // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2
34+
drop(_2) -> [return: bb2, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2
3535
}
3636

3737
bb2: {

tests/mir-opt/deref-patterns/string.foo.PreCodegen.after.mir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ fn foo(_1: Option<String>) -> i32 {
2525
_7 = const false; // scope 0 at $DIR/string.rs:+3:9: +3:10
2626
_6 = move _1; // scope 0 at $DIR/string.rs:+3:9: +3:10
2727
_0 = const 4321_i32; // scope 1 at $DIR/string.rs:+3:14: +3:18
28-
drop(_6) -> bb6; // scope 0 at $DIR/string.rs:+3:17: +3:18
28+
drop(_6) -> [return: bb6, unwind unreachable]; // scope 0 at $DIR/string.rs:+3:17: +3:18
2929
}
3030

3131
bb2: {
3232
_2 = &((_1 as Some).0: std::string::String); // scope 0 at $DIR/string.rs:+2:14: +2:17
33-
_3 = <String as Deref>::deref(move _2) -> bb3; // scope 0 at $DIR/string.rs:+2:14: +2:17
33+
_3 = <String as Deref>::deref(move _2) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
3434
// mir::Constant
3535
// + span: $DIR/string.rs:9:14: 9:17
3636
// + literal: Const { ty: for<'a> fn(&'a String) -> &'a <String as Deref>::Target {<String as Deref>::deref}, val: Value(<ZST>) }
3737
}
3838

3939
bb3: {
40-
_4 = <str as PartialEq>::eq(_3, const "a") -> bb4; // scope 0 at $DIR/string.rs:+2:14: +2:17
40+
_4 = <str as PartialEq>::eq(_3, const "a") -> [return: bb4, unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
4141
// mir::Constant
4242
// + span: $DIR/string.rs:9:14: 9:17
4343
// + literal: Const { ty: for<'a, 'b> fn(&'a str, &'b str) -> bool {<str as PartialEq>::eq}, val: Value(<ZST>) }
@@ -65,7 +65,7 @@ fn foo(_1: Option<String>) -> i32 {
6565
}
6666

6767
bb8: {
68-
drop(_1) -> bb7; // scope 0 at $DIR/string.rs:+5:1: +5:2
68+
drop(_1) -> [return: bb7, unwind unreachable]; // scope 0 at $DIR/string.rs:+5:1: +5:2
6969
}
7070

7171
bb9: {

0 commit comments

Comments
 (0)