Add explanation for E0379
This commit is contained in:
parent
01a8b5f26e
commit
c92267a863
1 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
A trait method was declared const.
|
||||||
|
|
||||||
|
Erroneous code example:
|
||||||
|
|
||||||
|
```compile_fail,E0379
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
|
trait Foo {
|
||||||
|
const fn bar() -> u32; // error!
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Trait methods cannot be declared `const` by design. For more information, see
|
Trait methods cannot be declared `const` by design. For more information, see
|
||||||
[RFC 911].
|
[RFC 911].
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue