blob: 36314afd6222d0ff73147f91faa768ba35e7881f [file] [log] [blame] [edit]
//@ check-pass
#![allow(unused_variables)]
use std::collections::HashMap;
use std::collections::hash_map::Entry::Vacant;
pub fn foo() {
type F = Box<dyn Fn(&()) + 'static>;
let mut map: HashMap<(), F> = HashMap::new();
let x: &mut F = match map.entry(()) {
Vacant(_) => unimplemented!(),
_ => unimplemented!()
};
}
fn main() {}