Skip to content

Commit

Permalink
Adjust example for error E0225
Browse files Browse the repository at this point in the history
It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.

Also use whitespace around `+`.
  • Loading branch information
bluss committed Apr 16, 2016
1 parent f0a1ea2 commit 869536e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_typeck/diagnostics.rs
Expand Up @@ -2717,7 +2717,7 @@ Rust does not currently support this. A simple example that causes this error:
```compile_fail
fn main() {
let _: Box<std::io::Read+std::io::Write>;
let _: Box<std::io::Read + std::io::Write>;
}
```
Expand All @@ -2727,7 +2727,7 @@ following compiles correctly:
```
fn main() {
let _: Box<std::io::Read+Copy+Sync>;
let _: Box<std::io::Read + Send + Sync>;
}
```
"##,
Expand Down

0 comments on commit 869536e

Please sign in to comment.