blob: ab438e41447125634365e46ab03a5e2d8e7bbf8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
A trait method was declared const.
Erroneous code example:
```compile_fail,E0379
trait Foo {
const fn bar() -> u32; // 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
|