]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/panic-assoc-never-type.rs
Rollup merge of #81716 - m-ou-se:fix-ice, r=eddyb
[rust.git] / src / test / ui / consts / const-eval / panic-assoc-never-type.rs
1 // build-fail
2
3 // Regression test for #66975
4 #![warn(const_err)]
5 #![feature(const_panic)]
6 #![feature(never_type)]
7
8 struct PrintName;
9
10 impl PrintName {
11     const VOID: ! = panic!();
12     //~^ WARN any use of this value will cause an error
13     //~| WARN this was previously accepted by the compiler but is being phased out
14 }
15
16 fn main() {
17     let _ = PrintName::VOID;
18     //~^ ERROR erroneous constant used
19 }