Skip to content

Commit 5f75326

Browse files
committed
fix spans for inline_couroutine panic-abort
1 parent 2fcb4d9 commit 5f75326

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
fn main() -> () {
55
let mut _0: ();
66
let _1: std::ops::CoroutineState<i32, bool>;
7-
let mut _2: std::pin::Pin<&mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8}>;
8-
let mut _3: &mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8};
9-
let mut _4: {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8};
7+
let mut _2: std::pin::Pin<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>;
8+
let mut _3: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
9+
let mut _4: {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
1010
+ let mut _5: bool;
1111
scope 1 {
1212
debug _r => _1;
1313
}
1414
+ scope 2 (inlined g) {
1515
+ }
16-
+ scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8}>::new) {
16+
+ scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new) {
1717
+ debug pointer => _3;
1818
+ scope 4 {
19-
+ scope 5 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8}>::new_unchecked) {
19+
+ scope 5 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new_unchecked) {
2020
+ debug pointer => _3;
2121
+ }
2222
+ }
2323
+ }
2424
+ scope 6 (inlined g::{closure#0}) {
2525
+ debug a => _5;
26-
+ let mut _6: &mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8};
26+
+ let mut _6: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
2727
+ let mut _7: u32;
2828
+ let mut _8: i32;
2929
+ }
@@ -34,22 +34,22 @@
3434
StorageLive(_3);
3535
StorageLive(_4);
3636
- _4 = g() -> [return: bb1, unwind unreachable];
37-
+ _4 = {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8 (#0)};
37+
+ _4 = {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8 (#0)};
3838
+ _3 = &mut _4;
39-
+ _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8}> { pointer: move _3 };
39+
+ _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}> { pointer: move _3 };
4040
+ StorageDead(_3);
4141
+ StorageLive(_5);
4242
+ _5 = const false;
4343
+ StorageLive(_6);
4444
+ StorageLive(_7);
45-
+ _6 = (_2.0: &mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8});
45+
+ _6 = (_2.0: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8});
4646
+ _7 = discriminant((*_6));
4747
+ switchInt(move _7) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9];
4848
}
4949

5050
bb1: {
5151
- _3 = &mut _4;
52-
- _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:17:5: 17:8}>::new(move _3) -> [return: bb2, unwind unreachable];
52+
- _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind unreachable];
5353
+ StorageDead(_7);
5454
+ StorageDead(_6);
5555
+ StorageDead(_5);
@@ -59,7 +59,7 @@
5959

6060
bb2: {
6161
- StorageDead(_3);
62-
- _1 = <{coroutine@$DIR/inline_coroutine.rs:17:5: 17:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
62+
- _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
6363
+ StorageDead(_4);
6464
+ _0 = const ();
6565
+ StorageDead(_1);

0 commit comments

Comments
 (0)