diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-04-22 14:27:30 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-04-29 14:30:53 -0700 |
| commit | b0522a497ccfcc7b124d77121d8f076af7f09b71 (patch) | |
| tree | fd6ce4ae9b4ff0ea4e538240bdef8ac72712dc93 /src/libsyntax | |
| parent | 58791c2fd884ad1af626df478c2b509e894b29ee (diff) | |
| download | rust-b0522a497ccfcc7b124d77121d8f076af7f09b71.tar.gz rust-b0522a497ccfcc7b124d77121d8f076af7f09b71.zip | |
librustc: Remove `ptr::addr_of`.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index e6f5d3608af..9c309c1b9f9 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -75,10 +75,10 @@ impl gen_send for message { body += ~"let b = pipe.reuse_buffer();\n"; body += fmt!("let %s = ::core::pipes::SendPacketBuffered(\ - ::ptr::addr_of(&(b.buffer.data.%s)));\n", + &(b.buffer.data.%s));\n", sp, next.name); body += fmt!("let %s = ::core::pipes::RecvPacketBuffered(\ - ::ptr::addr_of(&(b.buffer.data.%s)));\n", + &(b.buffer.data.%s));\n", rp, next.name); } else { @@ -365,9 +365,7 @@ impl gen_init for protocol { |s| ext_cx.parse_stmt( fmt!("data.%s.set_buffer(buffer)", s.name))), - ext_cx.parse_expr( - fmt!("::ptr::addr_of(&(data.%s))", - self.states[0].name)))); + ext_cx.parse_expr(fmt!("&(data.%s)", self.states[0].name)))); quote_expr!({ let buffer = $buffer; |
