Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

22781 #112

Closed
wants to merge 1 commit into from
Closed

22781 #112

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/22781.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use std::collections::HashMap;
use std::collections::hash_map::Entry::Vacant;

pub fn main() {
type F = Box<Fn(&()) + 'static>;
let mut map: HashMap<(), F> = HashMap::new();
let x: &mut F = match map.entry(()) {
Vacant(_) => unimplemented!(),
_ => unimplemented!()
};
}