summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0714.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0714.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0714.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0714.md b/compiler/rustc_error_codes/src/error_codes/E0714.md
new file mode 100644
index 000000000..45d1cafa6
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0714.md
@@ -0,0 +1,19 @@
+A `#[marker]` trait contained an associated item.
+
+Erroneous code example:
+
+```compile_fail,E0714
+#![feature(marker_trait_attr)]
+#![feature(associated_type_defaults)]
+
+#[marker]
+trait MarkerConst {
+ const N: usize; // error!
+}
+
+fn main() {}
+```
+
+The items of marker traits cannot be overridden, so there's no need to have them
+when they cannot be changed per-type anyway. If you wanted them for ergonomic
+reasons, consider making an extension trait instead.