]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-not-param.stderr
Apply suggestions from code review
[rust.git] / src / test / ui / regions / regions-infer-not-param.stderr
1 error[E0308]: mismatched types
2   --> $DIR/regions-infer-not-param.rs:15:54
3    |
4 LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p }
5    |                                                      ^ lifetime mismatch
6    |
7    = note: expected struct `Direct<'b>`
8               found struct `Direct<'a>`
9 note: the lifetime `'a` as defined on the function body at 15:16...
10   --> $DIR/regions-infer-not-param.rs:15:16
11    |
12 LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p }
13    |                ^^
14 note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 15:19
15   --> $DIR/regions-infer-not-param.rs:15:19
16    |
17 LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p }
18    |                   ^^
19
20 error[E0308]: mismatched types
21   --> $DIR/regions-infer-not-param.rs:19:63
22    |
23 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
24    |                                                               ^ lifetime mismatch
25    |
26    = note: expected struct `Indirect2<'b>`
27               found struct `Indirect2<'a>`
28 note: the lifetime `'a` as defined on the function body at 19:19...
29   --> $DIR/regions-infer-not-param.rs:19:19
30    |
31 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
32    |                   ^^
33 note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 19:22
34   --> $DIR/regions-infer-not-param.rs:19:22
35    |
36 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
37    |                      ^^
38
39 error[E0308]: mismatched types
40   --> $DIR/regions-infer-not-param.rs:19:63
41    |
42 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
43    |                                                               ^ lifetime mismatch
44    |
45    = note: expected struct `Indirect2<'b>`
46               found struct `Indirect2<'a>`
47 note: the lifetime `'b` as defined on the function body at 19:22...
48   --> $DIR/regions-infer-not-param.rs:19:22
49    |
50 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
51    |                      ^^
52 note: ...does not necessarily outlive the lifetime `'a` as defined on the function body at 19:19
53   --> $DIR/regions-infer-not-param.rs:19:19
54    |
55 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
56    |                   ^^
57
58 error: aborting due to 3 previous errors
59
60 For more information about this error, try `rustc --explain E0308`.