Skip to content

Commit

Permalink
Rollup merge of rust-lang#69697 - GuillaumeGomez:explanation-e0380, r…
Browse files Browse the repository at this point in the history
…=Dylan-DPC

Add explanation for E0380

r? @Dylan-DPC
  • Loading branch information
JohnTitor authored Mar 5, 2020
2 parents 210d693 + c745b4a commit c9f7758
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/librustc_error_codes/error_codes/E0380.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c9f7758

Please sign in to comment.