summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/issue-48238.stderr
blob: 0aa1eedad9fd9f297f1ed413edc0f794b3af13b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
error: lifetime may not live long enough
  --> $DIR/issue-48238.rs:9:13
   |
LL |     move || use_val(&orig);
   |     ------- ^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
   |     |     |
   |     |     return type of closure is &'2 u8
   |     lifetime `'1` represents this closure's body
   |
   = note: closure implements `Fn`, so references to captured variables can't escape the closure

error: aborting due to previous error