rust/src/test/ui/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.rs

17 lines
230 B
Rust
Raw Normal View History

#![allow(incomplete_features)]
#![feature(const_trait_impl)]
struct S;
trait T {
fn foo();
}
fn non_const() {}
impl const T for S {
fn foo() { non_const() }
2020-02-18 17:45:54 -06:00
//~^ ERROR can only call other `const fn`
}
fn main() {}