|
1 |
| -error[E0308]: mismatched types |
2 |
| - --> $DIR/bad-generic-in-copy-impl.rs:3:13 |
| 1 | +error: the constant `1` is not of type `usize` |
| 2 | + --> $DIR/bad-generic-in-copy-impl.rs:3:8 |
3 | 3 | |
|
4 | 4 | LL | x: [u8; SIZE],
|
5 |
| - | ^^^^ expected `usize`, found `u32` |
| 5 | + | ^^^^^^^^^^ expected `usize`, found `u32` |
6 | 6 |
|
7 |
| -error[E0308]: mismatched types |
8 |
| - --> $DIR/bad-generic-in-copy-impl.rs:3:13 |
| 7 | +error[E0204]: the trait `Copy` cannot be implemented for this type |
| 8 | + --> $DIR/bad-generic-in-copy-impl.rs:1:10 |
9 | 9 | |
|
| 10 | +LL | #[derive(Copy, Clone)] |
| 11 | + | ^^^^ |
| 12 | +LL | pub struct Foo { |
10 | 13 | LL | x: [u8; SIZE],
|
11 |
| - | ^^^^ expected `usize`, found `u32` |
| 14 | + | ------------- this field does not implement `Copy` |
12 | 15 | |
|
13 |
| - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 16 | +note: the `Copy` impl for `[u8; 1]` requires that `the constant `1` has type `usize`` |
| 17 | + --> $DIR/bad-generic-in-copy-impl.rs:3:8 |
| 18 | + | |
| 19 | +LL | x: [u8; SIZE], |
| 20 | + | ^^^^^^^^^^ |
| 21 | + = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 22 | + |
| 23 | +error: the constant `1` is not of type `usize` |
| 24 | + --> $DIR/bad-generic-in-copy-impl.rs:3:5 |
| 25 | + | |
| 26 | +LL | #[derive(Copy, Clone)] |
| 27 | + | ----- in this derive macro expansion |
| 28 | +LL | pub struct Foo { |
| 29 | +LL | x: [u8; SIZE], |
| 30 | + | ^^^^^^^^^^^^^ expected `usize`, found `u32` |
| 31 | + | |
| 32 | + = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) |
14 | 33 |
|
15 |
| -error: aborting due to 2 previous errors |
| 34 | +error: aborting due to 3 previous errors |
16 | 35 |
|
17 |
| -For more information about this error, try `rustc --explain E0308`. |
| 36 | +For more information about this error, try `rustc --explain E0204`. |
0 commit comments