From 3639d38d5c982193eab8304f2adfe0fcd2dd84bd Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 28 Sep 2012 21:51:14 -0700 Subject: Add a demoded version of ptr::addr_of Currently, the new version is ptr::p2::addr_of and the old one is ptr::addr_of. This is kind of cheesy, but I need a snapshot before I can ditch the old version, since the pipe compiler generates calls to addr_of. core is converted over to use the new version, std is not. --- src/libsyntax/ext/pipes/pipec.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index b9b1484ce5a..cec2972b2a7 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -71,10 +71,10 @@ impl message: gen_send { body += ~"let b = pipe.reuse_buffer();\n"; body += fmt!("let %s = pipes::SendPacketBuffered(\ - ptr::addr_of(b.buffer.data.%s));\n", + ptr::p2::addr_of(&(b.buffer.data.%s)));\n", sp, next.name); body += fmt!("let %s = pipes::RecvPacketBuffered(\ - ptr::addr_of(b.buffer.data.%s));\n", + ptr::p2::addr_of(&(b.buffer.data.%s)));\n", rp, next.name); } else { @@ -351,7 +351,7 @@ impl protocol: gen_init { fmt!("data.%s.set_buffer_(buffer)", s.name))), ext_cx.parse_expr( - fmt!("ptr::addr_of(data.%s)", + fmt!("ptr::p2::addr_of(&(data.%s))", self.states[0].name)))); #ast {{ -- cgit 1.4.1-3-g733a5