E0206 - added union
to description
This commit is contained in:
parent
18e305dfca
commit
dc39bf8efc
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
The `Copy` trait was implemented on a type which is neither a struct nor an
|
The `Copy` trait was implemented on a type which is neither a struct nor an
|
||||||
enum.
|
enum nor a union.
|
||||||
|
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
|
@ -10,6 +10,6 @@ struct Bar;
|
||||||
impl Copy for &'static mut Bar { } // error!
|
impl Copy for &'static mut Bar { } // error!
|
||||||
```
|
```
|
||||||
|
|
||||||
You can only implement `Copy` for a struct or an enum.
|
You can only implement `Copy` for a struct, a union, or an enum.
|
||||||
The previous example will fail because `&'static mut Bar`
|
The previous example will fail because `&'static mut Bar`
|
||||||
is not a struct or enum.
|
is not a struct or enum.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue