about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-09-28 21:51:14 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-09-28 22:19:01 -0700
commit3639d38d5c982193eab8304f2adfe0fcd2dd84bd (patch)
tree84d883ad752071f14a4300e5f59a9a4944651e0b /src/libsyntax
parentf1014c43fd4e22fa1a8190e642e05dc6891d6eaa (diff)
downloadrust-3639d38d5c982193eab8304f2adfe0fcd2dd84bd.tar.gz
rust-3639d38d5c982193eab8304f2adfe0fcd2dd84bd.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs6
1 files changed, 3 insertions, 3 deletions
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 {{