1
Fork 0

Add explanation for E0379

This commit is contained in:
Guillaume Gomez 2020-03-03 13:30:17 +01:00
parent 01a8b5f26e
commit c92267a863

View file

@ -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
[RFC 911].