Add regression test for issue 120600
This commit is contained in:
parent
c4f112af6e
commit
662d276573
22
tests/ui/never_type/eq-never-types.rs
Normal file
22
tests/ui/never_type/eq-never-types.rs
Normal 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() {}
|
20
tests/ui/never_type/eq-never-types.stderr
Normal file
20
tests/ui/never_type/eq-never-types.stderr
Normal 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
|
Loading…
x
Reference in New Issue
Block a user