]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/panic-never-type.rs
Auto merge of #81132 - bugadani:map-prealloc, r=matthewjasper
[rust.git] / src / test / ui / consts / const-eval / panic-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 const VOID: ! = panic!();
9 //~^ WARN any use of this value will cause an error
10 //~| WARN this was previously accepted by the compiler but is being phased out
11
12 fn main() {
13     let _ = VOID;
14     //~^ ERROR erroneous constant used
15 }