Rollup merge of #33039 - bluss:trait-obj-error, r=arielb1

Adjust example for error E0225

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 seems appropriate apropos issue #32963
This commit is contained in:
Manish Goregaokar 2016-04-17 17:50:35 +05:30
commit 4046f396ed

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>;
}
```
"##,