]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_error_codes/error_codes/E0380.md
New upstream version 1.43.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0380.md
index fe5de56933963183276a7b03aa5a2fdc95744e28..638f0c8ecc65f3260be6e80ab5c2eb30ea8e9e97 100644 (file)
@@ -1,4 +1,14 @@
-Auto traits cannot have methods or associated items.
-For more information see the [opt-in builtin traits RFC][RFC 19].
+An auto trait was declared with a method or an associated item.
+
+Erroneous code example:
+
+```compile_fail,E0380
+unsafe auto trait Trait {
+    type Output; // error!
+}
+```
+
+Auto traits cannot have methods or associated items. For more information see
+the [opt-in builtin traits RFC][RFC 19].
 
 [RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md