File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1- Trait objects need to have all associated types specified. Erroneous code
2- example:
1+ An associated type wasn't specified for a trait object.
2+
3+ Erroneous code example:
34
45``` compile_fail,E0191
56trait Trait {
@@ -10,8 +11,9 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
1011 // the trait `Trait`) must be specified
1112```
1213
13- Please verify you specified all associated types of the trait and that you
14- used the right trait. Example:
14+ Trait objects need to have all associated types specified. Please verify that
15+ all associated types of the trait were specified and the correct trait was used.
16+ Example:
1517
1618```
1719trait Trait {
Original file line number Diff line number Diff line change 1+ A negative impl was added on a trait implementation.
2+
3+ Erroneous code example:
4+
5+ ``` compile_fail,E0192
6+ trait Trait {
7+ type Bar;
8+ }
9+
10+ struct Foo;
11+
12+ impl !Trait for Foo { } //~ ERROR E0192
13+
14+ fn main() {}
15+ ```
16+
117Negative impls are only allowed for auto traits. For more
218information see the [ opt-in builtin traits RFC] [ RFC 19 ] .
319
You can’t perform that action at this time.
0 commit comments