12 fn test(x: bool, foo: Box<Triple>) -> isize {
14 let mut y: Box<Triple>;
15 if x { y = bar; } else { y = Box::new(Triple{x: 4, y: 5, z: 6}); }
20 let x: Box<_> = Box::new(Triple{x: 1, y: 2, z: 3});
21 assert_eq!(test(true, x.clone()), 2);
22 assert_eq!(test(true, x.clone()), 2);
23 assert_eq!(test(true, x.clone()), 2);
24 assert_eq!(test(false, x), 5);