//! Make sure we detect erroneous constants post-monomorphization even when they are unused. //! (https://github.com/rust-lang/miri/issues/1382) #![feature(never_type)] struct PrintName(T); impl PrintName { const VOID: ! = panic!(); //~ERROR: explicit panic } fn no_codegen() { if false { let _ = PrintName::::VOID; //~NOTE: constant } } fn main() { no_codegen::(); }