Skip to content

Commit d6d5b74

Browse files
authored
Rollup merge of #68176 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes r? @Dylan-DPC
2 parents 076d6a0 + 3ec0a84 commit d6d5b74

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/librustc_error_codes/error_codes/E0191.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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
56
trait 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
```
1719
trait Trait {

src/librustc_error_codes/error_codes/E0192.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
Negative impls are only allowed for auto traits. For more
218
information see the [opt-in builtin traits RFC][RFC 19].
319

0 commit comments

Comments
 (0)