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