Skip to content

Commit 4046f39

Browse files
committed
Rollup merge of rust-lang#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 rust-lang#32963
2 parents 43c23e5 + 869536e commit 4046f39

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)