Adjust example for error E0225

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 `+`.
This commit is contained in:
Ulrik Sverdrup 2016-04-16 21:29:31 +02:00
parent f0a1ea27cc
commit 869536ed2c

View File

@ -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>;
}
```
@ -2727,7 +2727,7 @@ following compiles correctly:
```
fn main() {
let _: Box<std::io::Read+Copy+Sync>;
let _: Box<std::io::Read + Send + Sync>;
}
```
"##,