2 #![feature(box_syntax)]
4 fn borrow<F>(x: &isize, f: F) where F: FnOnce(&isize) {
8 fn test1(x: &Box<isize>) {
9 borrow(&*(*x).clone(), |p| {
10 let x_a = &**x as *const isize;
11 assert!((x_a as usize) != (p as *const isize as usize));
12 assert_eq!(unsafe{*x_a}, *p);