Skip to content

Commit 8e25298

Browse files
Rollup merge of rust-lang#126286 - nnethercote:fix-test-LL-CC, r=lqd
Make `storage-live.rs` robust against rustc internal changes. Currently it can be made to fail by rearranging code within `compiler/rustc_mir_transform/src/lint.rs`. This is a precursor to rust-lang#125443. r? `@lqd`
2 parents e644975 + 1a60597 commit 8e25298

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/ui/mir/lint/storage-live.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//@ normalize-stderr-test "note: .*\n\n" -> ""
66
//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
77
//@ normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]"
8+
//@ normalize-stderr-test "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - "
89
//@ rustc-env:RUST_BACKTRACE=0
910

1011
#![feature(custom_mir, core_intrinsics)]

tests/ui/mir/lint/storage-live.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (after pass CheckPackedRef) at bb0[1]:
22
StorageLive(_1) which already has storage here
3-
--> $DIR/storage-live.rs:22:13
3+
--> $DIR/storage-live.rs:23:13
44
|
55
LL | StorageLive(a);
66
| ^^^^^^^^^^^^^^
77
|
8-
note: delayed at compiler/rustc_mir_transform/src/lint.rs:97:26 - disabled backtrace
9-
--> $DIR/storage-live.rs:22:13
8+
note: delayed at compiler/rustc_mir_transform/src/lint.rs:LL:CC - disabled backtrace
9+
--> $DIR/storage-live.rs:23:13
1010
|
1111
LL | StorageLive(a);
1212
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)