Skip to content

Commit

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

Clean up error codes E0223 and E0225 explanations

r? @Dylan-DPC
  • Loading branch information
JohnTitor authored Jan 24, 2020
2 parents cecffb6 + 768f6f9 commit e22ae2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/librustc_error_codes/error_codes/E0223.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
An attempt was made to retrieve an associated type, but the type was ambiguous.
For example:

Erroneous code example:

```compile_fail,E0223
trait MyTrait {type X; }
Expand Down
7 changes: 5 additions & 2 deletions src/librustc_error_codes/error_codes/E0225.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
You attempted to use multiple types as bounds for a closure or trait object.
Rust does not currently support this. A simple example that causes this error:
Multiple types were used as bounds for a closure or trait object.

Erroneous code example:

```compile_fail,E0225
fn main() {
let _: Box<dyn std::io::Read + std::io::Write>;
}
```

Rust does not currently support this.

Auto traits such as Send and Sync are an exception to this rule:
It's possible to have bounds of one non-builtin trait, plus any number of
auto traits. For example, the following compiles correctly:
Expand Down

0 comments on commit e22ae2c

Please sign in to comment.