about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/higher-ranked-return.stderr
blob: 23ce3df66165425dc18372224d90570b13c775fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error: lifetime may not live long enough
  --> $DIR/higher-ranked-return.rs:11:46
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________----_^
   | |                                |        |
   | |                                |        return type of async closure `{async closure body@$DIR/higher-ranked-return.rs:11:46: 13:10}` contains a lifetime `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |             x
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`

error: aborting due to 1 previous error