error[E0521]: borrowed data escapes outside of closure
  --> tests/ui/invalid/bi_hash_retain_stash.rs:30:9
   |
28 |     let mut stashed = Vec::new();
   |         ----------- `stashed` declared here, outside of the closure body
29 |     map.retain(|item| {
   |                 ---- `item` is a reference that is only valid in the closure body
30 |         stashed.push(item);
   |         ^^^^^^^^^^^^^^^^^^ `item` escapes the closure body here
   |
   = note: requirement occurs because of a mutable reference to `Vec<iddqd::bi_hash_map::RefMut<'_, Item>>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
