mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPC
Add explanation for E0379 r? @Dylan-DPC
This commit is contained in:
commit
f8c026b479
@ -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].
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user