1 extern crate interesting;
4 // function pointer case
5 let fns: Vec<_> = std::iter::repeat(interesting::function_called_always as fn())
8 interesting::call_a_bunch_of_functions(&fns[..]);
11 let trait_objects = vec![0u32; 1000];
12 let trait_objects: Vec<_> = trait_objects.iter().map(|x| x as &dyn interesting::Foo).collect();
13 interesting::call_a_bunch_of_trait_methods(&trait_objects[..]);