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
|
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/issue-52213.rs:2:11
|
LL | match (&t,) {
| ^^^^^
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
--> $DIR/issue-52213.rs:1:23
|
LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
| ^^
note: ...so that the types are compatible
--> $DIR/issue-52213.rs:2:11
|
LL | match (&t,) {
| ^^^^^
= note: expected `(&&(T,),)`
found `(&&'a (T,),)`
note: but, the lifetime must be valid for the lifetime `'b` as defined here...
--> $DIR/issue-52213.rs:1:27
|
LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/issue-52213.rs:3:20
|
LL | ((u,),) => u,
| ^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.
|