rust/src/test/ui/issues/issue-52213.stderr
2018-12-25 21:08:33 -07:00

29 lines
1.0 KiB
Plaintext

error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/issue-52213.rs:2:11
|
LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
| ^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 1:23...
--> $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:
expected (&&(T,),)
found (&&'a (T,),)
note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 1:27...
--> $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`.