about summary refs log tree commit diff
path: root/src/libsyntax/ext/source_util.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-06-10 00:49:59 -0700
committerBrian Anderson <banderson@mozilla.com>2012-06-13 11:30:45 -0700
commitce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a (patch)
tree55c2ee5be0986c2489879022d4788d6c3ac2c964 /src/libsyntax/ext/source_util.rs
parentbdd20000665a35e14b4ec2c54f893fc80fe451ef (diff)
downloadrust-ce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a.tar.gz
rust-ce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a.zip
Box AST idents
Diffstat (limited to 'src/libsyntax/ext/source_util.rs')
-rw-r--r--src/libsyntax/ext/source_util.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs
index 0680194ea6b..23c6a3714c3 100644
--- a/src/libsyntax/ext/source_util.rs
+++ b/src/libsyntax/ext/source_util.rs
@@ -36,19 +36,20 @@ fn expand_file(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
     get_mac_args(cx, sp, arg, 0u, option::some(0u), "file");
     let { file: @{ name: filename, _ }, _ } =
         codemap::lookup_char_pos(cx.codemap(), sp.lo);
-    ret make_new_lit(cx, sp, ast::lit_str(filename));
+    ret make_new_lit(cx, sp, ast::lit_str(@filename));
 }
 
 fn expand_stringify(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
                     _body: ast::mac_body) -> @ast::expr {
     let args = get_mac_args(cx, sp, arg, 1u, option::some(1u), "stringify");
-    ret make_new_lit(cx, sp, ast::lit_str(pprust::expr_to_str(args[0])));
+    ret make_new_lit(cx, sp, ast::lit_str(@pprust::expr_to_str(args[0])));
 }
 
 fn expand_mod(cx: ext_ctxt, sp: span, arg: ast::mac_arg, _body: ast::mac_body)
     -> @ast::expr {
     get_mac_args(cx, sp, arg, 0u, option::some(0u), "file");
-    ret make_new_lit(cx, sp, ast::lit_str(str::connect(cx.mod_path(), "::")));
+    ret make_new_lit(cx, sp, ast::lit_str(
+        @str::connect(cx.mod_path().map({|x|*x}), "::")));
 }
 
 fn expand_include(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
@@ -75,7 +76,7 @@ fn expand_include_str(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
       }
     }
 
-    ret make_new_lit(cx, sp, ast::lit_str(result::unwrap(res)));
+    ret make_new_lit(cx, sp, ast::lit_str(@result::unwrap(res)));
 }
 
 fn expand_include_bin(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,