Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPC

Add explanation for E0379

r? @Dylan-DPC
This commit is contained in:
Dylan DPC 2020-03-03 21:26:18 +01:00 committed by GitHub
commit f8c026b479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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].