]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/matching-lifetimes.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / traits / matching-lifetimes.stderr
1 error[E0308]: method not compatible with trait
2 --> $DIR/matching-lifetimes.rs:14:5
3 |
4 LL | fn foo(x: Foo<'b,'a>) {
5 | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6 |
7 = note: expected fn pointer `fn(Foo<'a, 'b>)`
8 found fn pointer `fn(Foo<'b, 'a>)`
9 note: the lifetime `'b` as defined on the impl at 13:9...
10 --> $DIR/matching-lifetimes.rs:13:9
11 |
12 LL | impl<'a,'b> Tr for Foo<'a,'b> {
13 | ^^
14 note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 13:6
15 --> $DIR/matching-lifetimes.rs:13:6
16 |
17 LL | impl<'a,'b> Tr for Foo<'a,'b> {
18 | ^^
19
20 error[E0308]: method not compatible with trait
21 --> $DIR/matching-lifetimes.rs:14:5
22 |
23 LL | fn foo(x: Foo<'b,'a>) {
24 | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
25 |
26 = note: expected fn pointer `fn(Foo<'a, 'b>)`
27 found fn pointer `fn(Foo<'b, 'a>)`
28 note: the lifetime `'a` as defined on the impl at 13:6...
29 --> $DIR/matching-lifetimes.rs:13:6
30 |
31 LL | impl<'a,'b> Tr for Foo<'a,'b> {
32 | ^^
33 note: ...does not necessarily outlive the lifetime `'b` as defined on the impl at 13:9
34 --> $DIR/matching-lifetimes.rs:13:9
35 |
36 LL | impl<'a,'b> Tr for Foo<'a,'b> {
37 | ^^
38
39 error: aborting due to 2 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.