diff options
| author | Jamilya Shurukhova <jamilya.shurukhova@jetbrains.com> | 2023-03-16 10:18:31 +0100 |
|---|---|---|
| committer | Jamilya Shurukhova <jamilya.shurukhova@jetbrains.com> | 2023-03-16 10:18:31 +0100 |
| commit | dc39bf8efc06bda8f510d1d64ce3302acc7ac0a3 (patch) | |
| tree | 8d65ec557f99a9dee4c5da238f034f241015c1d7 /compiler/rustc_error_codes/src | |
| parent | 18e305dfca6dfef07478378cb9a673fdba6ac3b3 (diff) | |
| download | rust-dc39bf8efc06bda8f510d1d64ce3302acc7ac0a3.tar.gz rust-dc39bf8efc06bda8f510d1d64ce3302acc7ac0a3.zip | |
E0206 - added `union` to description
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0206.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0206.md b/compiler/rustc_error_codes/src/error_codes/E0206.md index 4405a2149ce..a0a6c0ffdce 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0206.md +++ b/compiler/rustc_error_codes/src/error_codes/E0206.md @@ -1,5 +1,5 @@ The `Copy` trait was implemented on a type which is neither a struct nor an -enum. +enum nor a union. Erroneous code example: @@ -10,6 +10,6 @@ struct Bar; 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` is not a struct or enum. |
