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