|
1 |
| -error[E0119]: conflicting implementations of trait `Copy` for type `S<_>` |
2 |
| - --> $DIR/bad-const-wf-doesnt-specialize.rs:10:1 |
| 1 | +error[E0277]: the trait bound `S<N>: Clone` is not satisfied |
| 2 | + --> $DIR/bad-const-wf-doesnt-specialize.rs:8:29 |
3 | 3 | |
|
4 | 4 | LL | impl<const N: i32> Copy for S<N> {}
|
5 |
| - | -------------------------------- first implementation here |
6 |
| -LL | |
7 |
| -LL | impl<const M: usize> Copy for S<M> {} |
8 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `S<_>` |
| 5 | + | ^^^^ the trait `Clone` is not implemented for `S<N>` |
| 6 | + | |
| 7 | + = help: the trait `Clone` is implemented for `S<L>` |
| 8 | +note: required by a bound in `Copy` |
| 9 | + --> $SRC_DIR/core/src/marker.rs:LL:COL |
| 10 | +help: consider annotating `S<N>` with `#[derive(Clone)]` |
| 11 | + | |
| 12 | +LL + #[derive(Clone)] |
| 13 | +LL | struct S<const L: usize>; |
| 14 | + | |
| 15 | + |
| 16 | +error: the constant `N` is not of type `usize` |
| 17 | + --> $DIR/bad-const-wf-doesnt-specialize.rs:8:29 |
| 18 | + | |
| 19 | +LL | impl<const N: i32> Copy for S<N> {} |
| 20 | + | ^^^^ expected `usize`, found `i32` |
| 21 | + | |
| 22 | +note: required by a bound in `S` |
| 23 | + --> $DIR/bad-const-wf-doesnt-specialize.rs:6:10 |
| 24 | + | |
| 25 | +LL | struct S<const L: usize>; |
| 26 | + | ^^^^^^^^^^^^^^ required by this bound in `S` |
9 | 27 |
|
10 | 28 | error[E0308]: mismatched types
|
11 | 29 | --> $DIR/bad-const-wf-doesnt-specialize.rs:8:31
|
12 | 30 | |
|
13 | 31 | LL | impl<const N: i32> Copy for S<N> {}
|
14 | 32 | | ^ expected `usize`, found `i32`
|
15 | 33 |
|
16 |
| -error: aborting due to 2 previous errors |
| 34 | +error: aborting due to 3 previous errors |
17 | 35 |
|
18 |
| -Some errors have detailed explanations: E0119, E0308. |
19 |
| -For more information about an error, try `rustc --explain E0119`. |
| 36 | +Some errors have detailed explanations: E0277, E0308. |
| 37 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments