Skip to content

Commit 374ccfe

Browse files
committed
test: Fix borrowck-preserve-box-in-discr; more fallout from pattern bindings. rs=bustage
1 parent 6338865 commit 374ccfe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/run-pass/borrowck-preserve-box-in-discr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
fn main() {
44
let mut x = @{f: ~3};
55
match x {
6-
@{f: b_x} => {
7-
assert *b_x == 3;
8-
assert ptr::addr_of(&(*x.f)) == ptr::addr_of(&(*b_x));
6+
@{f: ref b_x} => {
7+
assert **b_x == 3;
8+
assert ptr::addr_of(&(*x.f)) == ptr::addr_of(&(**b_x));
99

1010
x = @{f: ~4};
1111

12-
debug!("ptr::addr_of(*b_x) = %x", ptr::addr_of(&(*b_x)) as uint);
13-
assert *b_x == 3;
14-
assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(*b_x));
12+
debug!("ptr::addr_of(*b_x) = %x", ptr::addr_of(&(**b_x)) as uint);
13+
assert **b_x == 3;
14+
assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(**b_x));
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)