11error[E0049]: const `A` has 1 type parameter but its trait declaration has 0 type parameters
2- --> $DIR/compare-impl-item.rs:15 :13
2+ --> $DIR/compare-impl-item.rs:16 :13
33 |
44LL | const A: ();
55 | - expected 0 type parameters
@@ -8,7 +8,7 @@ LL | const A<T>: () = ();
88 | ^ found 1 type parameter
99
1010error[E0049]: const `B` has 1 const parameter but its trait declaration has 2 const parameters
11- --> $DIR/compare-impl-item.rs:17 :13
11+ --> $DIR/compare-impl-item.rs:18 :13
1212 |
1313LL | const B<const K: u64, const Q: u64>: u64;
1414 | ------------ ------------
@@ -19,7 +19,7 @@ LL | const B<const K: u64>: u64 = 0;
1919 | ^^^^^^^^^^^^ found 1 const parameter
2020
2121error[E0049]: const `C` has 0 type parameters but its trait declaration has 1 type parameter
22- --> $DIR/compare-impl-item.rs:19 :13
22+ --> $DIR/compare-impl-item.rs:20 :13
2323 |
2424LL | const C<T>: T;
2525 | - expected 1 type parameter
@@ -28,7 +28,7 @@ LL | const C<'a>: &'a str = "";
2828 | ^^ found 0 type parameters
2929
3030error[E0053]: const `D` has an incompatible generic parameter for trait `Trait`
31- --> $DIR/compare-impl-item.rs:21 :13
31+ --> $DIR/compare-impl-item.rs:22 :13
3232 |
3333LL | trait Trait<P> {
3434 | -----
@@ -42,25 +42,34 @@ LL | impl<P> Trait<P> for () {
4242LL | const D<const N: u16>: u16 = N;
4343 | ^^^^^^^^^^^^ found const parameter of type `u16`
4444
45+ error[E0195]: lifetime parameters or bounds on const `E` do not match the trait declaration
46+ --> $DIR/compare-impl-item.rs:24:12
47+ |
48+ LL | const E<'a>: &'a ();
49+ | ---- lifetimes in impl do not match this const in trait
50+ ...
51+ LL | const E: &'static () = &();
52+ | ^ lifetimes do not match const in trait
53+
4554error[E0276]: impl has stricter requirements than trait
46- --> $DIR/compare-impl-item.rs:26 :12
55+ --> $DIR/compare-impl-item.rs:29 :12
4756 |
48- LL | const E : usize;
49- | -------------- definition of `E ` from trait
57+ LL | const F : usize;
58+ | -------------- definition of `F ` from trait
5059...
5160LL | P: Copy;
5261 | ^^^^ impl has extra requirement `P: Copy`
5362
5463error[E0276]: impl has stricter requirements than trait
55- --> $DIR/compare-impl-item.rs:27 :16
64+ --> $DIR/compare-impl-item.rs:30 :16
5665 |
57- LL | const F <T: PartialEq>: ();
58- | ------------------------- definition of `F ` from trait
66+ LL | const G <T: PartialEq>: ();
67+ | ------------------------- definition of `G ` from trait
5968...
60- LL | const F <T: Eq>: () = ();
69+ LL | const G <T: Eq>: () = ();
6170 | ^^ impl has extra requirement `T: Eq`
6271
63- error: aborting due to 6 previous errors
72+ error: aborting due to 7 previous errors
6473
65- Some errors have detailed explanations: E0049, E0053, E0276.
74+ Some errors have detailed explanations: E0049, E0053, E0195, E0276.
6675For more information about an error, try `rustc --explain E0049`.
0 commit comments