blob: 32b3ef72d8bda611f94bed13e278400efc920a91 [file] [log] [blame]
error: borrowed data cannot be stored outside of its closure
--> $DIR/issue-7573.rs:21:27
|
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
| - cannot infer an appropriate lifetime...
LL |
LL | let push_id = |installed_id: &CrateId| {
| ------- ------------------------ borrowed data cannot outlive this closure
| |
| ...so that variable is valid at time of its declaration
...
LL | lines_to_use.push(installed_id);
| ^^^^^^^^^^^^ cannot be stored outside of its closure
error: aborting due to previous error