File: regions-bound-missing-bound-in-impl.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 (78 lines) | stat: -rw-r--r-- 3,685 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
76
77
78
error[E0195]: lifetime parameters or bounds on method `no_bound` do not match the trait declaration
  --> $DIR/regions-bound-missing-bound-in-impl.rs:19:16
   |
LL |     fn no_bound<'b>(self, b: Inv<'b>);
   |                ---- lifetimes in impl do not match this method in trait
...
LL |     fn no_bound<'b:'a>(self, b: Inv<'b>) {
   |                ^^^^^^^ lifetimes do not match method in trait

error[E0195]: lifetime parameters or bounds on method `has_bound` do not match the trait declaration
  --> $DIR/regions-bound-missing-bound-in-impl.rs:23:17
   |
LL |     fn has_bound<'b:'a>(self, b: Inv<'b>);
   |                 ------- lifetimes in impl do not match this method in trait
...
LL |     fn has_bound<'b>(self, b: Inv<'b>) {
   |                 ^^^^ lifetimes do not match method in trait

error[E0308]: method not compatible with trait
  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:5
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
   |
   = note: expected signature `fn(&'a _, Inv<'c>, Inv<'c>, Inv<'_>)`
              found signature `fn(&'a _, Inv<'_>, Inv<'c>, Inv<'_>)`
note: the lifetime `'c` as defined here...
  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
   |                        ^^
note: ...does not necessarily outlive the lifetime `'c` as defined here
  --> $DIR/regions-bound-missing-bound-in-impl.rs:12:24
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>);
   |                        ^^

error[E0308]: method not compatible with trait
  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:5
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
   |
   = note: expected signature `fn(&'a _, Inv<'c>, Inv<'c>, Inv<'_>)`
              found signature `fn(&'a _, Inv<'_>, Inv<'c>, Inv<'_>)`
note: the lifetime `'c` as defined here...
  --> $DIR/regions-bound-missing-bound-in-impl.rs:12:24
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>);
   |                        ^^
note: ...does not necessarily outlive the lifetime `'c` as defined here
  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
   |
LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
   |                        ^^

error[E0195]: lifetime parameters or bounds on method `wrong_bound2` do not match the trait declaration
  --> $DIR/regions-bound-missing-bound-in-impl.rs:42:20
   |
LL |     fn wrong_bound2<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>);
   |                    ---------------- lifetimes in impl do not match this method in trait
...
LL |     fn wrong_bound2(self, b: Inv, c: Inv, d: Inv) {
   |                    ^ lifetimes do not match method in trait

error[E0276]: impl has stricter requirements than trait
  --> $DIR/regions-bound-missing-bound-in-impl.rs:49:26
   |
LL |     fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>);
   |     ------------------------------------------------------- definition of `another_bound` from trait
...
LL |     fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
   |                          ^^ impl has extra requirement `'x: 't`

error: aborting due to 6 previous errors

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