#![feature(type_alias_impl_trait)] trait Bar { fn bar(&self); } type FooFn = impl FnOnce(B); fn foo() -> FooFn { fn mop(bar: B) { bar.bar() } mop // NOTE: no function pointer, but function zst item //~^ ERROR the trait bound `B: Bar` is not satisfied } fn main() { let boom: FooFn = unsafe { core::mem::zeroed() }; boom(42); }