|
| 1 | +error[E0049]: const `A` has 1 type parameter but its trait declaration has 0 type parameters |
| 2 | + --> $DIR/compare-impl-item.rs:15:13 |
| 3 | + | |
| 4 | +LL | const A: (); |
| 5 | + | - expected 0 type parameters |
| 6 | +... |
| 7 | +LL | const A<T>: () = (); |
| 8 | + | ^ found 1 type parameter |
| 9 | + |
| 10 | +error[E0049]: const `B` has 1 const parameter but its trait declaration has 2 const parameters |
| 11 | + --> $DIR/compare-impl-item.rs:17:13 |
| 12 | + | |
| 13 | +LL | const B<const K: u64, const Q: u64>: u64; |
| 14 | + | ------------ ------------ |
| 15 | + | | |
| 16 | + | expected 2 const parameters |
| 17 | +... |
| 18 | +LL | const B<const K: u64>: u64 = 0; |
| 19 | + | ^^^^^^^^^^^^ found 1 const parameter |
| 20 | + |
| 21 | +error[E0049]: const `C` has 0 type parameters but its trait declaration has 1 type parameter |
| 22 | + --> $DIR/compare-impl-item.rs:19:13 |
| 23 | + | |
| 24 | +LL | const C<T>: T; |
| 25 | + | - expected 1 type parameter |
| 26 | +... |
| 27 | +LL | const C<'a>: &'a str = ""; |
| 28 | + | ^^ found 0 type parameters |
| 29 | + |
| 30 | +error[E0053]: const `D` has an incompatible generic parameter for trait `Trait` |
| 31 | + --> $DIR/compare-impl-item.rs:21:13 |
| 32 | + | |
| 33 | +LL | trait Trait<P> { |
| 34 | + | ----- |
| 35 | +... |
| 36 | +LL | const D<const N: usize>: usize; |
| 37 | + | -------------- expected const parameter of type `usize` |
| 38 | +... |
| 39 | +LL | impl<P> Trait<P> for () { |
| 40 | + | ----------------------- |
| 41 | +... |
| 42 | +LL | const D<const N: u16>: u16 = N; |
| 43 | + | ^^^^^^^^^^^^ found const parameter of type `u16` |
| 44 | + |
| 45 | +error[E0276]: impl has stricter requirements than trait |
| 46 | + --> $DIR/compare-impl-item.rs:26:12 |
| 47 | + | |
| 48 | +LL | const E: usize; |
| 49 | + | -------------- definition of `E` from trait |
| 50 | +... |
| 51 | +LL | P: Copy; |
| 52 | + | ^^^^ impl has extra requirement `P: Copy` |
| 53 | + |
| 54 | +error[E0276]: impl has stricter requirements than trait |
| 55 | + --> $DIR/compare-impl-item.rs:27:16 |
| 56 | + | |
| 57 | +LL | const F<T: PartialEq>: (); |
| 58 | + | ------------------------- definition of `F` from trait |
| 59 | +... |
| 60 | +LL | const F<T: Eq>: () = (); |
| 61 | + | ^^ impl has extra requirement `T: Eq` |
| 62 | + |
| 63 | +error: aborting due to 6 previous errors |
| 64 | + |
| 65 | +Some errors have detailed explanations: E0049, E0053, E0276. |
| 66 | +For more information about an error, try `rustc --explain E0049`. |
0 commit comments