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

16 lines
193 B
Rust
Raw Normal View History

#![feature(const_trait_impl)]
struct S;
trait T {
fn foo();
}
fn non_const() {}
impl const T for S {
fn foo() { non_const() }
2021-12-09 11:10:05 -06:00
//~^ ERROR cannot call non-const fn
}
fn main() {}