2018-01-15 10:55:10 -08:00
|
|
|
error: borrowed data cannot be stored outside of its closure
|
2018-01-19 12:30:30 -08:00
|
|
|
--> $DIR/issue-7573.rs:32:27
|
2018-01-15 10:55:10 -08:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
|
2018-01-19 12:30:30 -08:00
|
|
|
| - cannot infer an appropriate lifetime...
|
2018-02-25 02:01:39 +03:00
|
|
|
LL | //~^ NOTE cannot infer an appropriate lifetime
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let push_id = |installed_id: &CrateId| {
|
2018-01-19 12:30:30 -08:00
|
|
|
| ------- ------------------------ borrowed data cannot outlive this closure
|
|
|
|
| |
|
|
|
|
| ...so that variable is valid at time of its declaration
|
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | lines_to_use.push(installed_id);
|
2018-01-15 10:55:10 -08:00
|
|
|
| ^^^^^^^^^^^^ cannot be stored outside of its closure
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|