diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-04-17 17:50:35 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-04-17 17:50:35 +0530 |
| commit | 4046f396ed74ed1a5b86f219ff725e97d91ffc9b (patch) | |
| tree | b53f45030098f3540ed0d9ba4b868d9a7effc22c | |
| parent | 43c23e5ebab1827540afda8d5e7079686addedff (diff) | |
| parent | 869536ed2c45bc5bdcdeabc92221cba36c3f7ec7 (diff) | |
| download | rust-4046f396ed74ed1a5b86f219ff725e97d91ffc9b.tar.gz rust-4046f396ed74ed1a5b86f219ff725e97d91ffc9b.zip | |
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
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 1cfbfb37d34..646efe09da8 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -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>; } ``` "##, |
