]>
Commit | Line | Data |
---|---|---|
e9174d1e SL |
1 | #![feature(box_syntax)] |
2 | use std::any::Any; | |
85aaf69f | 3 | |
e9174d1e SL |
4 | fn main() |
5 | { | |
6 | fn h(x:i32) -> i32 {3*x} | |
dc9dc135 | 7 | let mut vfnfer:Vec<Box<dyn Any>> = vec![]; |
e9174d1e | 8 | vfnfer.push(box h); |
dc9dc135 | 9 | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); |
e9174d1e | 10 | //~^ ERROR the precise format of `Fn`-family traits' |
b7449926 | 11 | //~| ERROR wrong number of type arguments: expected 1, found 0 [E0107] |
1b1a35ee | 12 | //~| ERROR the value of the associated type `Output` (from trait `FnOnce`) |
62682a34 | 13 | } |