fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
2.8 KiB59 linesraw
1error[E0195]: lifetime parameters or bounds on method `no_bound` do not match the trait declaration
2  --> $DIR/regions-bound-missing-bound-in-impl.rs:19:16
3   |
4LL |     fn no_bound<'b>(self, b: Inv<'b>);
5   |                ---- lifetimes in impl do not match this method in trait
6...
7LL |     fn no_bound<'b:'a>(self, b: Inv<'b>) {
8   |                ^^^^^^^ lifetimes do not match method in trait
9
10error[E0195]: lifetime parameters or bounds on method `has_bound` do not match the trait declaration
11  --> $DIR/regions-bound-missing-bound-in-impl.rs:23:17
12   |
13LL |     fn has_bound<'b:'a>(self, b: Inv<'b>);
14   |                 ------- lifetimes in impl do not match this method in trait
15...
16LL |     fn has_bound<'b>(self, b: Inv<'b>) {
17   |                 ^^^^ lifetimes do not match method in trait
18
19error[E0308]: method not compatible with trait
20  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:5
21   |
22LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
23   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
24   |
25   = note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)`
26              found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)`
27note: the lifetime `'c` as defined on the method body at 27:24...
28  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
29   |
30LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
31   |                        ^^
32note: ...does not necessarily outlive the lifetime `'c` as defined on the method body at 27:24
33  --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
34   |
35LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
36   |                        ^^
37
38error[E0195]: lifetime parameters or bounds on method `wrong_bound2` do not match the trait declaration
39  --> $DIR/regions-bound-missing-bound-in-impl.rs:41:20
40   |
41LL |     fn wrong_bound2<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>);
42   |                    ---------------- lifetimes in impl do not match this method in trait
43...
44LL |     fn wrong_bound2(self, b: Inv, c: Inv, d: Inv) {
45   |                    ^ lifetimes do not match method in trait
46
47error[E0276]: impl has stricter requirements than trait
48  --> $DIR/regions-bound-missing-bound-in-impl.rs:48:5
49   |
50LL |     fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>);
51   |     ------------------------------------------------------- definition of `another_bound` from trait
52...
53LL |     fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
54   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'x: 't`
55
56error: aborting due to 5 previous errors
57
58Some errors have detailed explanations: E0195, E0276, E0308.
59For more information about an error, try `rustc --explain E0195`.