]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/const-fn-in-trait.rs
Rollup merge of #107037 - tmiasko:rank, r=oli-obk
[rust.git] / tests / 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() { }