1 // Regression test for #66975 - ensure that we don't keep unevaluated
2 // `!`-typed constants until codegen.
4 // Force generation of optimized mir for functions that do not reach codegen.
5 // compile-flags: --emit mir,link
7 #![feature(const_panic)]
9 struct PrintName<T>(T);
11 impl<T> PrintName<T> {
12 const VOID: ! = panic!();
16 let _ = PrintName::<T>::VOID;
22 // START rustc.no_codegen.PreCodegen.after.mir
25 // _1 = const PrintName::<T>::VOID;
28 // END rustc.no_codegen.PreCodegen.after.mir