]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/const-fn-in-trait.rs
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
[rust.git] / src / test / ui / mismatched_types / const-fn-in-trait.rs
1 #![feature(const_fn)]
2
3 trait Foo {
4     fn f() -> u32;
5     const fn g(); //~ ERROR cannot be declared const
6 }
7
8 impl Foo for u32 {
9     const fn f() -> u32 { 22 } //~ ERROR cannot be declared const
10     fn g() {}
11 }
12
13 fn main() { }