-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPC
Add explanation for E0380 r? @Dylan-DPC
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |