error[E0521]: borrowed data escapes outside of closure
  --> tests/ui/invalid/tri_hash_retain_stash.rs:41:9
   |
39 |     let mut stashed = Vec::new();
   |         ----------- `stashed` declared here, outside of the closure body
40 |     map.retain(|item| {
   |                 ---- `item` is a reference that is only valid in the closure body
41 |         stashed.push(item);
   |         ^^^^^^^^^^^^^^^^^^ `item` escapes the closure body here
   |
   = note: requirement occurs because of a mutable reference to `Vec<iddqd::tri_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
