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