Skip to content

Commit 869536e

Browse files
committed
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 `+`.
1 parent f0a1ea2 commit 869536e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2717,7 +2717,7 @@ Rust does not currently support this. A simple example that causes this error:
27172717
27182718
```compile_fail
27192719
fn main() {
2720-
let _: Box<std::io::Read+std::io::Write>;
2720+
let _: Box<std::io::Read + std::io::Write>;
27212721
}
27222722
```
27232723
@@ -2727,7 +2727,7 @@ following compiles correctly:
27272727
27282728
```
27292729
fn main() {
2730-
let _: Box<std::io::Read+Copy+Sync>;
2730+
let _: Box<std::io::Read + Send + Sync>;
27312731
}
27322732
```
27332733
"##,

0 commit comments

Comments
 (0)