diff options
Diffstat (limited to 'src/test/run-pass/borrowck-borrow-from-expr-block.rs')
| -rw-r--r-- | src/test/run-pass/borrowck-borrow-from-expr-block.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/run-pass/borrowck-borrow-from-expr-block.rs b/src/test/run-pass/borrowck-borrow-from-expr-block.rs index fe1be6d06db..4aedb4e96cf 100644 --- a/src/test/run-pass/borrowck-borrow-from-expr-block.rs +++ b/src/test/run-pass/borrowck-borrow-from-expr-block.rs @@ -10,15 +10,13 @@ #[feature(managed_boxes)]; -use std::ptr; - fn borrow(x: &int, f: |x: &int|) { f(x) } fn test1(x: @~int) { borrow(&*(*x).clone(), |p| { - let x_a = ptr::to_unsafe_ptr(&**x); + let x_a = &**x as *int; assert!((x_a as uint) != (p as *int as uint)); assert_eq!(unsafe{*x_a}, *p); }) |
