1
Fork 0

Rollup merge of #69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPC

Add explanation for E0380

r? @Dylan-DPC
This commit is contained in:
Dylan DPC 2020-03-05 22:03:58 +01:00 committed by GitHub
commit e01dc83aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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