2 #![allow(unused_variables)]
3 use std::collections::HashMap;
4 use std::collections::hash_map::Entry::Vacant;
7 type F = Box<dyn Fn(&()) + 'static>;
8 let mut map: HashMap<(), F> = HashMap::new();
9 let x: &mut F = match map.entry(()) {
10 Vacant(_) => unimplemented!(),