diff options
| author | bstrie <865233+bstrie@users.noreply.github.com> | 2021-06-05 17:20:51 -0400 |
|---|---|---|
| committer | bstrie <865233+bstrie@users.noreply.github.com> | 2021-11-08 13:11:59 -0500 |
| commit | 3024efff59368d6271dab1a8ac78434175647e9b (patch) | |
| tree | cde796ceb3ba6ef822a0dc8648409468d462bb3e /compiler/rustc_error_codes | |
| parent | ce1143e94d37107b0c89a99bb12ad3e91b02a9f5 (diff) | |
| download | rust-3024efff59368d6271dab1a8ac78434175647e9b.tar.gz rust-3024efff59368d6271dab1a8ac78434175647e9b.zip | |
Update Copy/Clone documentation WRT arrays
Diffstat (limited to 'compiler/rustc_error_codes')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0206.md | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0206.md b/compiler/rustc_error_codes/src/error_codes/E0206.md index da53b671ad0..4405a2149ce 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0206.md +++ b/compiler/rustc_error_codes/src/error_codes/E0206.md @@ -4,15 +4,12 @@ enum. Erroneous code example: ```compile_fail,E0206 -type Foo = [u8; 256]; -impl Copy for Foo { } // error! - #[derive(Copy, Clone)] struct Bar; impl Copy for &'static mut Bar { } // error! ``` -You can only implement `Copy` for a struct or an enum. Both of the previous -examples will fail, because neither `[u8; 256]` nor `&'static mut Bar` -(mutable reference to `Bar`) is a struct or enum. +You can only implement `Copy` for a struct or an enum. +The previous example will fail because `&'static mut Bar` +is not a struct or enum. |
