1 //! Make sure we detect erroneous constants post-monomorphization even when they are unused.
2 //! (https://github.com/rust-lang/miri/issues/1382)
3 // Inlining changes the error location
4 //@compile-flags: -Zmir-opt-level=0
5 #![feature(never_type)]
6 #![warn(warnings, const_err)]
8 struct PrintName<T>(T);
10 const VOID: ! = panic!(); //~ERROR: evaluation of `PrintName::<i32>::VOID` failed
15 let _ = PrintName::<T>::VOID; //~ERROR: post-monomorphization error