blob: 4405a2149ceb80c12bd21033e34709d18da82efd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
The `Copy` trait was implemented on a type which is neither a struct nor an
enum.
Erroneous code example:
```compile_fail,E0206
#[derive(Copy, Clone)]
struct Bar;
impl Copy for &'static mut Bar { } // error!
```
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.
|