//@ known-bug: #110395 #![feature(const_trait_impl)] #[const_trait] trait Convert { fn to(self) -> T; } impl const Convert for A where B: ~const From { fn to(self) -> B { B::from(self) } } const FOO: fn() -> String = || "foo".to(); fn main() {}