2018-07-15 14:11:54 -07:00
|
|
|
error: unsatisfied lifetime constraints
|
|
|
|
--> $DIR/issue-40510-1.rs:18:9
|
|
|
|
|
|
2018-08-05 14:33:38 +01:00
|
|
|
LL | || {
|
|
|
|
| --
|
2018-08-06 21:42:26 +01:00
|
|
|
| ||
|
|
|
|
| |return type of closure is &'2 mut std::boxed::Box<()>
|
2018-08-05 14:33:38 +01:00
|
|
|
| lifetime `'1` represents this closure's body
|
|
|
|
LL | &mut x
|
2018-08-07 21:48:50 +01:00
|
|
|
| ^^^^^^ returning this value requires that `'1` must outlive `'2`
|
2018-08-05 14:33:38 +01:00
|
|
|
|
|
|
|
|
= note: closure implements `FnMut`, so references to captured variables can't escape the closure
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|