fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
762 B15 linesraw
1error: lifetime may not live long enough
2  --> $DIR/issue-53432-nested-closure-outlives-borrowed-value.rs:4:9
3   |
4LL |     let _action = move || {
5   |                   -------
6   |                   |     |
7   |                   |     return type of closure is [closure@$DIR/issue-53432-nested-closure-outlives-borrowed-value.rs:4:9: 4:15 f:&'2 [closure@$DIR/issue-53432-nested-closure-outlives-borrowed-value.rs:2:13: 2:23]]
8   |                   lifetime `'1` represents this closure's body
9LL |         || f() // The `nested` closure
10   |         ^^^^^^ returning this value requires that `'1` must outlive `'2`
11   |
12   = note: closure implements `Fn`, so references to captured variables can't escape the closure
13
14error: aborting due to previous error
15