Skip to content

Commit

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

r? @Dylan-DPC
  • Loading branch information
Dylan-DPC committed Mar 5, 2020
2 parents c79f5f0 + c745b4a commit e01dc83
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 e01dc83

Please sign in to comment.