// build-fail fn assert_zst() { struct F(T); impl F { const V: () = assert!(std::mem::size_of::() == 0); //~^ ERROR: evaluation of `assert_zst::F::::V` failed [E0080] //~| NOTE: in this expansion of assert! //~| NOTE: the evaluated program panicked //~| ERROR: evaluation of `assert_zst::F::::V` failed [E0080] //~| NOTE: in this expansion of assert! //~| NOTE: the evaluated program panicked } let _ = F::::V; } fn foo() { assert_zst::() //~^ NOTE: the above error was encountered while instantiating `fn assert_zst::` //~| NOTE: the above error was encountered while instantiating `fn assert_zst::` } fn bar() { foo::() } fn main() { bar::<()>(); bar::(); bar::(); bar::(); }