]>
Commit | Line | Data |
---|---|---|
72b1a166 FG |
1 | error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements |
2 | --> $DIR/issue-75777.rs:13:14 | |
3 | | | |
4 | LL | Box::new(move |_| fut) | |
5 | | ^^^^^^^^^^^^ | |
6 | | | |
7 | note: 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 | | | |
10 | LL | fn inject<'a, Env: 'a, A: 'a + Send>(v: A) -> Box<dyn FnOnce(&'a Env) -> BoxFuture<'a, A>> { | |
11 | | ^^ | |
12 | note: ...so that the types are compatible | |
13 | --> $DIR/issue-75777.rs:13:14 | |
14 | | | |
15 | LL | 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... | |
20 | note: ...so that the expression is assignable | |
21 | --> $DIR/issue-75777.rs:13:5 | |
22 | | | |
23 | LL | 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 | ||
28 | error: aborting due to previous error | |
29 | ||
30 | For more information about this error, try `rustc --explain E0495`. |