1
Fork 0

Rollup merge of #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 #125443.

r? ```@lqd```
This commit is contained in:
Jubilee 2024-06-12 03:57:23 -07:00 committed by GitHub
commit 6cde179355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -5,6 +5,7 @@
//@ normalize-stderr-test "note: .*\n\n" -> "" //@ normalize-stderr-test "note: .*\n\n" -> ""
//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" //@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
//@ normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]" //@ normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]"
//@ normalize-stderr-test "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - "
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
#![feature(custom_mir, core_intrinsics)] #![feature(custom_mir, core_intrinsics)]

View file

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