]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0206.md
Rollup merge of #68120 - Centril:ban-range-to-dotdotdot, r=oli-obk
[rust.git] / src / librustc_error_codes / error_codes / E0206.md
1 You can only implement `Copy` for a struct or enum. Both of the following
2 examples will fail, because neither `[u8; 256]` nor `&'static mut Bar`
3 (mutable reference to `Bar`) is a struct or enum:
4
5 ```compile_fail,E0206
6 type Foo = [u8; 256];
7 impl Copy for Foo { } // error
8
9 #[derive(Copy, Clone)]
10 struct Bar;
11 impl Copy for &'static mut Bar { } // error
12 ```