Skip to content

Commit 021b3f5

Browse files
author
Nick Hamann
committed
Revise the E0206 long diagnostics message.
1 parent a40c49c commit 021b3f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,17 @@ differs from the behavior for `&T`, which is `Copy` when `T` is `Copy`).
218218
"##,
219219

220220
E0206: r##"
221-
You can only implement `Copy` for a struct or enum. For example, both of the
222-
following examples will fail, because neither `i32` nor `&'static mut Bar` is
223-
a struct or enum:
221+
You can only implement `Copy` for a struct or enum. Both of the following
222+
examples will fail, because neither `i32` (primitive type) nor `&'static Bar`
223+
(reference to `Bar`) is a struct or enum:
224224
225225
```
226226
type Foo = i32;
227227
impl Copy for Foo { } // error
228228
229229
#[derive(Copy, Clone)]
230230
struct Bar;
231-
impl Copy for &'static mut Bar { } // error
231+
impl Copy for &'static Bar { } // error
232232
```
233233
"##,
234234

0 commit comments

Comments
 (0)