1 // Regression test for the ICE described in #88643. Specifically:
2 // https://github.com/rust-lang/rust/issues/88643#issuecomment-913128893
3 // and https://github.com/rust-lang/rust/issues/88643#issuecomment-913171935
4 // and https://github.com/rust-lang/rust/issues/88643#issuecomment-913765984
6 use std::collections::HashMap;
10 static CALLBACKS: HashMap<*const dyn T, dyn FnMut(&mut _) + 'static> = HashMap::new();
11 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
13 static CALLBACKS2: Vec<dyn Fn(& _)> = Vec::new();
14 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
16 static CALLBACKS3: Option<dyn Fn(& _)> = None;
17 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]