From 833eb7ae1da68ad3ad0cb51b3b28f207c435b931 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Dec 2012 22:42:49 -0800 Subject: [PATCH] test: Fix borrowck-preserve-box-in-pat. rs=bustage --- src/test/run-pass/borrowck-preserve-box-in-pat.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/run-pass/borrowck-preserve-box-in-pat.rs b/src/test/run-pass/borrowck-preserve-box-in-pat.rs index f0944ea3544..b389affcd2c 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-pat.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-pat.rs @@ -3,15 +3,15 @@ fn main() { let mut x = @mut @{f: ~3}; match x { - @@{f: b_x} => { - assert *b_x == 3; - assert ptr::addr_of(&(x.f)) == ptr::addr_of(&(b_x)); + @@{f: ref b_x} => { + assert **b_x == 3; + assert ptr::addr_of(&(x.f)) == ptr::addr_of(b_x); *x = @{f: ~4}; - debug!("ptr::addr_of(*b_x) = %x", ptr::addr_of(&(*b_x)) as uint); - assert *b_x == 3; - assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(*b_x)); + debug!("ptr::addr_of(*b_x) = %x", ptr::addr_of(&(**b_x)) as uint); + assert **b_x == 3; + assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(**b_x)); } } }