File: compare-impl-item.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (75 lines) | stat: -rw-r--r-- 2,492 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
error[E0049]: const `A` has 1 type parameter but its trait declaration has 0 type parameters
  --> $DIR/compare-impl-item.rs:16:13
   |
LL |     const A: ();
   |            - expected 0 type parameters
...
LL |     const A<T>: () = ();
   |             ^ found 1 type parameter

error[E0049]: const `B` has 1 const parameter but its trait declaration has 2 const parameters
  --> $DIR/compare-impl-item.rs:18:13
   |
LL |     const B<const K: u64, const Q: u64>: u64;
   |             ------------  ------------
   |             |
   |             expected 2 const parameters
...
LL |     const B<const K: u64>: u64 = 0;
   |             ^^^^^^^^^^^^ found 1 const parameter

error[E0049]: const `C` has 0 type parameters but its trait declaration has 1 type parameter
  --> $DIR/compare-impl-item.rs:20:13
   |
LL |     const C<T>: T;
   |             - expected 1 type parameter
...
LL |     const C<'a>: &'a str = "";
   |             ^^ found 0 type parameters

error[E0053]: const `D` has an incompatible generic parameter for trait `Trait`
  --> $DIR/compare-impl-item.rs:22:13
   |
LL | trait Trait<P> {
   |       -----
...
LL |     const D<const N: usize>: usize;
   |             -------------- expected const parameter of type `usize`
...
LL | impl<P> Trait<P> for () {
   | -----------------------
...
LL |     const D<const N: u16>: u16 = N;
   |             ^^^^^^^^^^^^ found const parameter of type `u16`

error[E0195]: lifetime parameters or bounds on const `E` do not match the trait declaration
  --> $DIR/compare-impl-item.rs:24:12
   |
LL |     const E<'a>: &'a ();
   |            ---- lifetimes in impl do not match this const in trait
...
LL |     const E: &'static () = &();
   |            ^ lifetimes do not match const in trait

error[E0276]: impl has stricter requirements than trait
  --> $DIR/compare-impl-item.rs:29:12
   |
LL |     const F: usize;
   |     -------------- definition of `F` from trait
...
LL |         P: Copy;
   |            ^^^^ impl has extra requirement `P: Copy`

error[E0276]: impl has stricter requirements than trait
  --> $DIR/compare-impl-item.rs:30:16
   |
LL |     const G<T: PartialEq>: ();
   |     ------------------------- definition of `G` from trait
...
LL |     const G<T: Eq>: () = ();
   |                ^^ impl has extra requirement `T: Eq`

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0049, E0053, E0195, E0276.
For more information about an error, try `rustc --explain E0049`.