blob: 86e3e5f769f8a303d3cd66012d1f12cd320ac26a [file]
//@ known-bug: #110395
#![feature(const_trait_impl)]
#[const_trait]
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() {}