Add explanation for E0380

This commit is contained in:
Guillaume Gomez 2020-03-04 13:01:19 +01:00
parent 01a8b5f26e
commit c745b4a184

View 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