Skip to content

Commit

Permalink
Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Add explanation for E0379

r? @Dylan-DPC
  • Loading branch information
Dylan-DPC authored Mar 3, 2020
2 parents 587ca17 + c92267a commit f8c026b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/librustc_error_codes/error_codes/E0379.md
Original file line number Diff line number Diff line change
@@ -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].

Expand Down

0 comments on commit f8c026b

Please sign in to comment.