Skip to content

Commit c9f7758

Browse files
authored
Rollup merge of rust-lang#69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPC
Add explanation for E0380 r? @Dylan-DPC
2 parents 210d693 + c745b4a commit c9f7758

File tree

1 file changed

+12
-2
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+12
-2
lines changed
+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
Auto traits cannot have methods or associated items.
2-
For more information see the [opt-in builtin traits RFC][RFC 19].
1+
An auto trait was declared with a method or an associated item.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0380
6+
unsafe auto trait Trait {
7+
type Output; // error!
8+
}
9+
```
10+
11+
Auto traits cannot have methods or associated items. For more information see
12+
the [opt-in builtin traits RFC][RFC 19].
313

414
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md

0 commit comments

Comments
 (0)