diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-03 21:26:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-03 21:26:18 +0100 |
| commit | f8c026b47925b8cf004cc67819e2f1091470faee (patch) | |
| tree | 31e792843cd53187300ba0ac0b5d9250e5ab02f3 /src | |
| parent | 587ca17cdb2b6dc202389a59e2b236dd63c711a3 (diff) | |
| parent | c92267a86393df927feccd3d03894a6cfe92dea8 (diff) | |
| download | rust-f8c026b47925b8cf004cc67819e2f1091470faee.tar.gz rust-f8c026b47925b8cf004cc67819e2f1091470faee.zip | |
Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPC
Add explanation for E0379 r? @Dylan-DPC
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0379.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0379.md b/src/librustc_error_codes/error_codes/E0379.md index 3503da6ac2f..930204847ec 100644 --- a/src/librustc_error_codes/error_codes/E0379.md +++ b/src/librustc_error_codes/error_codes/E0379.md @@ -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]. |
