File tree 2 files changed +22
-4
lines changed
src/librustc_error_codes/error_codes
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:
3
4
4
5
``` compile_fail,E0191
5
6
trait Trait {
@@ -10,8 +11,9 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
10
11
// the trait `Trait`) must be specified
11
12
```
12
13
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:
15
17
16
18
```
17
19
trait 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
+
1
17
Negative impls are only allowed for auto traits. For more
2
18
information see the [ opt-in builtin traits RFC] [ RFC 19 ] .
3
19
You can’t perform that action at this time.
0 commit comments