2 #![allow(unused_braces)]
4 fn test_generic<T, F>(expected: Box<T>, eq: F) where T: Clone, F: FnOnce(Box<T>, Box<T>) -> bool {
5 let actual: Box<T> = { expected.clone() };
6 assert!(eq(expected, actual));
10 fn compare_box(b1: Box<bool>, b2: Box<bool>) -> bool {
15 test_generic::<bool, _>(Box::new(true), compare_box);
18 pub fn main() { test_box(); }