2 #![allow(unused_braces)]
3 #![feature(box_syntax)]
5 fn test_generic<T, F>(expected: Box<T>, eq: F) where T: Clone, F: FnOnce(Box<T>, Box<T>) -> bool {
6 let actual: Box<T> = { expected.clone() };
7 assert!(eq(expected, actual));
11 fn compare_box(b1: Box<bool>, b2: Box<bool>) -> bool {
16 test_generic::<bool, _>(box true, compare_box);
19 pub fn main() { test_box(); }