// build-fail // Regression test for #66975 #![warn(unconditional_panic)] #![feature(never_type)] struct PrintName(T); impl PrintName { const VOID: ! = { let x = 0 * std::mem::size_of::(); [][x] }; //~^ ERROR evaluation of `PrintName::<()>::VOID` failed } fn f() { let _ = PrintName::::VOID; } pub fn main() { f::<()>(); }