]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-88643.rs
fn-trait-closure test now pass on new solver
[rust.git] / tests / 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() {}