2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(unused_variables)]
|
2015-10-24 17:29:13 -04:00
|
|
|
use std::collections::HashMap;
|
|
|
|
use std::collections::hash_map::Entry::Vacant;
|
|
|
|
|
|
|
|
pub fn foo() {
|
2019-05-28 14:46:13 -04:00
|
|
|
type F = Box<dyn Fn(&()) + 'static>;
|
2015-10-24 17:29:13 -04:00
|
|
|
let mut map: HashMap<(), F> = HashMap::new();
|
|
|
|
let x: &mut F = match map.entry(()) {
|
|
|
|
Vacant(_) => unimplemented!(),
|
|
|
|
_ => unimplemented!()
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|