Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revise the E0206 long diagnostics message.
  • Loading branch information
Nick Hamann committed May 10, 2015
commit 021b3f55d6a10e668a6fa7b51b4f8cd10a2493e5
8 changes: 4 additions & 4 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,17 @@ differs from the behavior for `&T`, which is `Copy` when `T` is `Copy`).
"##,

E0206: r##"
You can only implement `Copy` for a struct or enum. For example, both of the
following examples will fail, because neither `i32` nor `&'static mut Bar` is
a struct or enum:
You can only implement `Copy` for a struct or enum. Both of the following
examples will fail, because neither `i32` (primitive type) nor `&'static Bar`
(reference to `Bar`) is a struct or enum:

```
type Foo = i32;
impl Copy for Foo { } // error

#[derive(Copy, Clone)]
struct Bar;
impl Copy for &'static mut Bar { } // error
impl Copy for &'static Bar { } // error
```
"##,

Expand Down