blob: d0d41c271c6bd0bfd1f2bb7febb863d40c7c2832 (
plain)
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
|
error[E0308]: mismatched types
--> $DIR/regions-infer-not-param.rs:15:54
|
LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `Direct<'b>`
found type `Direct<'a>`
note: the lifetime 'a as defined on the function body at 15:16...
--> $DIR/regions-infer-not-param.rs:15:16
|
LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types
| ^^
note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 15:19
--> $DIR/regions-infer-not-param.rs:15:19
|
LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types
| ^^
error[E0308]: mismatched types
--> $DIR/regions-infer-not-param.rs:19:63
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `Indirect2<'b>`
found type `Indirect2<'a>`
note: the lifetime 'a as defined on the function body at 19:19...
--> $DIR/regions-infer-not-param.rs:19:19
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^^
note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 19:22
--> $DIR/regions-infer-not-param.rs:19:22
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^^
error[E0308]: mismatched types
--> $DIR/regions-infer-not-param.rs:19:63
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `Indirect2<'b>`
found type `Indirect2<'a>`
note: the lifetime 'b as defined on the function body at 19:22...
--> $DIR/regions-infer-not-param.rs:19:22
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^^
note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 19:19
--> $DIR/regions-infer-not-param.rs:19:19
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
| ^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0308`.
|