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