2 #![feature(box_syntax)]
4 fn test_generic<T: Clone, F>(expected: T, eq: F) where F: FnOnce(T, T) -> bool {
5 let actual: T = match true {
6 true => expected.clone(),
9 assert!(eq(expected, actual));
13 fn compare_box(v1: Box<isize>, v2: Box<isize>) -> bool { return v1 == v2; }
14 test_generic::<Box<isize>, _>(box 1, compare_box);
17 pub fn main() { test_vec(); }