Skip to content

Commit ac0f697

Browse files
Rollup merge of #144190 - scottmcm:spanned-errors-in-mir-validation, r=RalfJung
Give a message with a span on MIR validation error It was handy to get a source+line link for rust-lang/rust#143833, even if it's just to the function and not necessarily to the statement. r? mir
2 parents 714d205 + f4757ef commit ac0f697

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/panic/mir-validation.stderr

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
error: internal compiler error: compiler/rustc_mir_transform/src/validate.rs:LL:CC: broken MIR in Item(DefId) (after phase change to runtime-optimized) at bb0[1]:
2+
place (*(_2.0: *mut i32)) has deref as a later projection (it is only permitted as the first projection)
3+
--> tests/panic/mir-validation.rs:LL:CC
4+
|
5+
LL | *(tuple.0) = 1;
6+
| ^^^^^^^^^^^^^^
7+
18

29
thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:LL:CC:
3-
broken MIR in Item(DefId) (after phase change to runtime-optimized) at bb0[1]:
4-
place (*(_2.0: *mut i32)) has deref as a later projection (it is only permitted as the first projection)
10+
Box<dyn Any>
511
stack backtrace:
612

7-
error: the compiler unexpectedly panicked. this is a bug.
8-
913

1014

1115

@@ -20,3 +24,5 @@ LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
2024
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2125
|
2226

27+
error: aborting due to 1 previous error
28+

0 commit comments

Comments
 (0)