-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01a8b5f
commit c745b4a
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 |