blob: 35f546cfdb737dc9293776cb114236b710617966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
A trait method was declared const.
Erroneous code example:
```compile_fail,E0379
trait Foo {
const fn bar() -> u32; // error!
}
impl Foo for () {
const fn bar() -> u32 { 0 } // error!
}
```
Trait methods cannot be declared `const` by design. For more information, see
[RFC 911].
[RFC 911]: https://github.com/rust-lang/rfcs/pull/911
|