]> git.lizzy.rs Git - rust.git/commitdiff
Adjust example for error E0225
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Sat, 16 Apr 2016 19:29:31 +0000 (21:29 +0200)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Sat, 16 Apr 2016 19:30:50 +0000 (21:30 +0200)
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 `+`.

src/librustc_typeck/diagnostics.rs

index bef6c1ed43aa6a08438152fb6ae93776e8256d26..dbe412079b23bc950c018ba790d95b5c353177a4 100644 (file)
@@ -2717,7 +2717,7 @@ fn main() {
 
 ```compile_fail
 fn main() {
-    let _: Box<std::io::Read+std::io::Write>;
+    let _: Box<std::io::Read + std::io::Write>;
 }
 ```
 
@@ -2727,7 +2727,7 @@ fn main() {
 
 ```
 fn main() {
-    let _: Box<std::io::Read+Copy+Sync>;
+    let _: Box<std::io::Read + Send + Sync>;
 }
 ```
 "##,