]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/const-fn-in-trait.rs
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[rust.git] / src / test / ui / mismatched_types / const-fn-in-trait.rs
1 trait Foo {
2     fn f() -> u32;
3     const fn g(); //~ ERROR cannot be declared const
4 }
5
6 impl Foo for u32 {
7     const fn f() -> u32 { 22 } //~ ERROR cannot be declared const
8     fn g() {}
9 }
10
11 fn main() { }