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