]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.rs
Rollup merge of #106739 - WaffleLapkin:astconv, r=estebank
[rust.git] / tests / ui / rfc-2632-const-trait-impl / const-check-fns-in-const-impl.rs
1 #![feature(const_trait_impl)]
2
3 struct S;
4 #[const_trait]
5 trait T {
6     fn foo();
7 }
8
9 fn non_const() {}
10
11 impl const T for S {
12     fn foo() { non_const() }
13     //~^ ERROR cannot call non-const fn
14 }
15
16 fn main() {}