Skip to content

Commit

Permalink
Rollup merge of rust-lang#68176 - GuillaumeGomez:clean-up-err-codes, …
Browse files Browse the repository at this point in the history
…r=Dylan-DPC

Clean up err codes

r? @Dylan-DPC
  • Loading branch information
JohnTitor authored Jan 14, 2020
2 parents 076d6a0 + 3ec0a84 commit d6d5b74
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/librustc_error_codes/error_codes/E0191.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Trait objects need to have all associated types specified. Erroneous code
example:
An associated type wasn't specified for a trait object.

Erroneous code example:

```compile_fail,E0191
trait Trait {
Expand All @@ -10,8 +11,9 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
// the trait `Trait`) must be specified
```

Please verify you specified all associated types of the trait and that you
used the right trait. Example:
Trait objects need to have all associated types specified. Please verify that
all associated types of the trait were specified and the correct trait was used.
Example:

```
trait Trait {
Expand Down
16 changes: 16 additions & 0 deletions src/librustc_error_codes/error_codes/E0192.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
A negative impl was added on a trait implementation.

Erroneous code example:

```compile_fail,E0192
trait Trait {
type Bar;
}
struct Foo;
impl !Trait for Foo { } //~ ERROR E0192
fn main() {}
```

Negative impls are only allowed for auto traits. For more
information see the [opt-in builtin traits RFC][RFC 19].

Expand Down

0 comments on commit d6d5b74

Please sign in to comment.