]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-52213.stderr
Rollup merge of #60492 - acrrd:issues/54054_chain, r=SimonSapin
[rust.git] / src / test / ui / issues / issue-52213.stderr
1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2   --> $DIR/issue-52213.rs:2:11
3    |
4 LL |     match (&t,) {
5    |           ^^^^^
6    |
7 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 1:23...
8   --> $DIR/issue-52213.rs:1:23
9    |
10 LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
11    |                       ^^
12    = note: ...so that the types are compatible:
13            expected (&&(T,),)
14               found (&&'a (T,),)
15 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 1:27...
16   --> $DIR/issue-52213.rs:1:27
17    |
18 LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
19    |                           ^^
20 note: ...so that reference does not outlive borrowed content
21   --> $DIR/issue-52213.rs:3:20
22    |
23 LL |         ((u,),) => u,
24    |                    ^
25
26 error: aborting due to previous error
27