1 //! Make sure we error on erroneous consts even if they are unused.
2 #![allow(unconditional_panic)]
4 struct PrintName<T>(T);
6 const VOID: () = [()][2]; //~ERROR evaluation of `PrintName::<i32>::VOID` failed
11 // This bad constant is only used in dead code in a static initializer... and yet we still
12 // must make sure that the build fails.
13 let _ = PrintName::<i32>::VOID; //~ constant