diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-borrow-from-expr-block.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-borrow-from-expr-block.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/ui/borrowck/borrowck-borrow-from-expr-block.rs b/src/test/ui/borrowck/borrowck-borrow-from-expr-block.rs deleted file mode 100644 index 24efadc30..000000000 --- a/src/test/ui/borrowck/borrowck-borrow-from-expr-block.rs +++ /dev/null @@ -1,17 +0,0 @@ -// run-pass - -fn borrow<F>(x: &isize, f: F) where F: FnOnce(&isize) { - f(x) -} - -fn test1(x: &Box<isize>) { - borrow(&*(*x).clone(), |p| { - let x_a = &**x as *const isize; - assert!((x_a as usize) != (p as *const isize as usize)); - assert_eq!(unsafe{*x_a}, *p); - }) -} - -pub fn main() { - test1(&Box::new(22)); -} |