We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
union
1 parent 18e305d commit dc39bf8Copy full SHA for dc39bf8
compiler/rustc_error_codes/src/error_codes/E0206.md
@@ -1,5 +1,5 @@
1
The `Copy` trait was implemented on a type which is neither a struct nor an
2
-enum.
+enum nor a union.
3
4
Erroneous code example:
5
@@ -10,6 +10,6 @@ struct Bar;
10
impl Copy for &'static mut Bar { } // error!
11
```
12
13
-You can only implement `Copy` for a struct or an enum.
+You can only implement `Copy` for a struct, a union, or an enum.
14
The previous example will fail because `&'static mut Bar`
15
is not a struct or enum.
0 commit comments