Debian Codegraph @

gcc/testsuite/rust/compile/issue-2040.rs

raw
1 trait Foo {
2 fn f() -> u32;
3 }
4
5 impl Foo for u32 {
6 const fn f() -> u32 {
7 // { dg-error "functions in traits cannot be declared .const." "" { target *-*-* } .-1 }
8 22
9 }
10 }
11
12 fn main() {}