blob: c0051c62b6d65727f0afe2f61f1b6bbd02180b29 [file] [edit]
#![feature(const_trait_impl, const_convert)]
//@ check-pass
const trait Convert<T> {
fn to(self) -> T;
}
impl<A, B> const Convert<B> for A where B: [const] From<A> {
fn to(self) -> B {
B::from(self)
}
}
const FOO: fn() -> String = || "foo".to();
fn main() {}