Skip to content

Commit 3cff5a5

Browse files
author
Nick Hamann
committed
Revise the E0206 long diagnostics message.
1 parent 3dbef05 commit 3cff5a5

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
@@ -187,17 +187,17 @@ differs from the behavior for `&T`, which is `Copy` when `T` is `Copy`).
187187
"##,
188188

189189
E0206: r##"
190-
You can only implement `Copy` for a struct or enum. For example, both of the
191-
following examples will fail, because neither `i32` nor `&'static mut Bar` is
192-
a struct or enum:
190+
You can only implement `Copy` for a struct or enum. Both of the following
191+
examples will fail, because neither `i32` (primitive type) nor `&'static Bar`
192+
(reference to `Bar`) is a struct or enum:
193193
194194
```
195195
type Foo = i32;
196196
impl Copy for Foo { } // error
197197
198198
#[derive(Copy, Clone)]
199199
struct Bar;
200-
impl Copy for &'static mut Bar { } // error
200+
impl Copy for &'static Bar { } // error
201201
```
202202
"##,
203203

0 commit comments

Comments
 (0)