Skip to content

Commit f8c026b

Browse files
authored
Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPC
Add explanation for E0379 r? @Dylan-DPC
2 parents 587ca17 + c92267a commit f8c026b

File tree

1 file changed

+12
-0
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+12
-0
lines changed

src/librustc_error_codes/error_codes/E0379.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
A trait method was declared const.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0379
6+
#![feature(const_fn)]
7+
8+
trait Foo {
9+
const fn bar() -> u32; // error!
10+
}
11+
```
12+
113
Trait methods cannot be declared `const` by design. For more information, see
214
[RFC 911].
315

0 commit comments

Comments
 (0)