We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 374ccfe commit 833eb7aCopy full SHA for 833eb7a
src/test/run-pass/borrowck-preserve-box-in-pat.rs
@@ -3,15 +3,15 @@
3
fn main() {
4
let mut x = @mut @{f: ~3};
5
match x {
6
- @@{f: b_x} => {
7
- assert *b_x == 3;
8
- 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);
9
10
*x = @{f: ~4};
11
12
- debug!("ptr::addr_of(*b_x) = %x", ptr::addr_of(&(*b_x)) as uint);
13
14
- 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 ptr::addr_of(&(*x.f)) != ptr::addr_of(&(**b_x));
15
}
16
17
0 commit comments