]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-88643.rs
Auto merge of #99967 - Mark-Simulacrum:download-llvm-ci, r=jyn514
[rust.git] / src / test / ui / typeck / issue-88643.rs
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
5
6 use std::collections::HashMap;
7
8 pub trait T {}
9
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]
12
13 static CALLBACKS2: Vec<dyn Fn(& _)> = Vec::new();
14 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
15
16 static CALLBACKS3: Option<dyn Fn(& _)> = None;
17 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
18
19 fn main() {}