From 374ccfee9ab27350de07ddff20df4afcbdcd6a39 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Dec 2012 22:00:55 -0800 Subject: [PATCH] test: Fix borrowck-preserve-box-in-discr; more fallout from pattern bindings. rs=bustage --- src/test/run-pass/borrowck-preserve-box-in-discr.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/run-pass/borrowck-preserve-box-in-discr.rs b/src/test/run-pass/borrowck-preserve-box-in-discr.rs index c65472ec894..d622239a52a 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-discr.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-discr.rs @@ -3,15 +3,15 @@ fn main() { let mut x = @{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)); } } }