#![feature(type_alias_impl_trait)] #![allow(dead_code)] type Bug = impl Fn(T) -> U + Copy; union Moo { x: Bug, y: (), } const CONST_BUG: Bug = unsafe { Moo { y: () }.x }; fn make_bug>() -> Bug { |x| x.into() //~ ERROR the trait bound `U: From` is not satisfied } fn main() { CONST_BUG(0); }