Add regression test for issue 120600

This commit is contained in:
Maybe Waffle 2024-04-06 17:18:25 +00:00
parent c4f112af6e
commit 662d276573
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,22 @@
//@ known-bug: #120600
//
// issue: rust-lang/rust#120600
//@ failure-status: 101
//@ normalize-stderr-test: "DefId\(.*?\]::" -> "DefId("
//@ normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> ""
//@ normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> ""
//@ normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> ""
//@ normalize-stderr-test: "(?m)note: delayed at.*$" -> ""
//@ normalize-stderr-test: "(?m)^ *\d+: .*\n" -> ""
//@ normalize-stderr-test: "(?m)^ *at .*\n" -> ""
#![allow(internal_features)]
#![feature(never_type, rustc_attrs)]
#![rustc_never_type_options(fallback = "never")]
fn ice(a: !) {
a == a;
}
fn main() {}

View File

@ -0,0 +1,20 @@
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: broken MIR in DefId(ice) (Terminator { source_info: SourceInfo { span: $DIR/eq-never-types.rs:19:5: 19:11 (#0), scope: scope[0] }, kind: _3 = <! as PartialEq>::eq(move _4, move _5) -> [return: bb1, unwind: bb2] }): bad arg #0 (&'?4 ! <- !): NoSolution
--> $DIR/eq-never-types.rs:19:10
|
LL | a == a;
| ^
|
--> $DIR/eq-never-types.rs:19:10
|
LL | a == a;
| ^
note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly
query stack during panic:
end of query stack