about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-03 21:26:18 +0100
committerGitHub <noreply@github.com>2020-03-03 21:26:18 +0100
commitf8c026b47925b8cf004cc67819e2f1091470faee (patch)
tree31e792843cd53187300ba0ac0b5d9250e5ab02f3 /src
parent587ca17cdb2b6dc202389a59e2b236dd63c711a3 (diff)
parentc92267a86393df927feccd3d03894a6cfe92dea8 (diff)
downloadrust-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.md12
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].