3 // Regression test for #66975
4 #![warn(const_err, unconditional_panic)]
5 #![feature(never_type)]
7 struct PrintName<T>(T);
10 const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
11 //~^ WARN any use of this value will cause an error
12 //~| WARN this was previously accepted by the compiler but is being phased out
17 let _ = PrintName::<T>::VOID;
18 //~^ ERROR erroneous constant encountered