#![feature(const_trait_impl, const_convert)] //@ check-pass #[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() {}