]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-75777.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-75777.stderr
CommitLineData
72b1a166
FG
1error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2 --> $DIR/issue-75777.rs:13:14
3 |
4LL | Box::new(move |_| fut)
5 | ^^^^^^^^^^^^
6 |
7note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 11:11...
8 --> $DIR/issue-75777.rs:11:11
9 |
10LL | fn inject<'a, Env: 'a, A: 'a + Send>(v: A) -> Box<dyn FnOnce(&'a Env) -> BoxFuture<'a, A>> {
11 | ^^
12note: ...so that the types are compatible
13 --> $DIR/issue-75777.rs:13:14
14 |
15LL | Box::new(move |_| fut)
16 | ^^^^^^^^^^^^
17 = note: expected `(Pin<Box<dyn Future<Output = A> + Send>>,)`
18 found `(Pin<Box<(dyn Future<Output = A> + Send + 'a)>>,)`
19 = note: but, the lifetime must be valid for the static lifetime...
20note: ...so that the expression is assignable
21 --> $DIR/issue-75777.rs:13:5
22 |
23LL | Box::new(move |_| fut)
24 | ^^^^^^^^^^^^^^^^^^^^^^
25 = note: expected `Box<(dyn FnOnce(&'a Env) -> Pin<Box<(dyn Future<Output = A> + Send + 'a)>> + 'static)>`
26 found `Box<dyn FnOnce(&'a Env) -> Pin<Box<(dyn Future<Output = A> + Send + 'a)>>>`
27
28error: aborting due to previous error
29
30For more information about this error, try `rustc --explain E0495`.