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

16 lines
196 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() }
2020-09-17 12:32:07 -05:00
//~^ ERROR calls in constant functions
}
fn main() {}