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