rust/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

19 lines
285 B
Rust

//@ 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() {}