]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-23024.rs
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / ui / issues / issue-23024.rs
1 use std::any::Any;
2
3 fn main()
4 {
5     fn h(x:i32) -> i32 {3*x}
6     let mut vfnfer:Vec<Box<dyn Any>> = vec![];
7     vfnfer.push(Box::new(h));
8     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
9     //~^ ERROR the precise format of `Fn`-family traits'
10     //~| ERROR missing generics for trait `Fn`
11     //~| ERROR the value of the associated type `Output` (from trait `FnOnce`)
12 }