about summary refs log tree commit diff
path: root/src/libsyntax/ext/fmt.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-12 13:00:50 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-13 20:07:09 -0700
commitb1c699815ddf22bf17b58a8c3d317af33745e28d (patch)
tree164b9b4cb10ca38a8908c2b3d84f56f2a0cb78fb /src/libsyntax/ext/fmt.rs
parent24a0de4e7f26d5bbd071fbec5b3958b650cd3f56 (diff)
downloadrust-b1c699815ddf22bf17b58a8c3d317af33745e28d.tar.gz
rust-b1c699815ddf22bf17b58a8c3d317af33745e28d.zip
librustc: Don't accept `as Trait` anymore; fix all occurrences of it.
Diffstat (limited to 'src/libsyntax/ext/fmt.rs')
-rw-r--r--src/libsyntax/ext/fmt.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs
index ee0de9e48db..f6a6ddefb7e 100644
--- a/src/libsyntax/ext/fmt.rs
+++ b/src/libsyntax/ext/fmt.rs
@@ -27,7 +27,7 @@ use ext::build::*;
 
 use core::unstable::extfmt::ct::*;
 
-pub fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
+pub fn expand_syntax_ext(cx: @ext_ctxt, sp: span, tts: &[ast::token_tree])
     -> base::MacResult {
     let args = get_exprs_from_tts(cx, tts);
     if args.len() == 0 {
@@ -38,7 +38,7 @@ pub fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
                     ~"first argument to fmt! must be a string literal.");
     let fmtspan = args[0].span;
     debug!("Format string: %s", fmt);
-    fn parse_fmt_err_(cx: ext_ctxt, sp: span, msg: &str) -> ! {
+    fn parse_fmt_err_(cx: @ext_ctxt, sp: span, msg: &str) -> ! {
         cx.span_fatal(sp, msg);
     }
     let parse_fmt_err: @fn(&str) -> ! = |s| parse_fmt_err_(cx, fmtspan, s);
@@ -50,23 +50,23 @@ pub fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
 // probably be factored out in common with other code that builds
 // expressions.  Also: Cleanup the naming of these functions.
 // Note: Moved many of the common ones to build.rs --kevina
-fn pieces_to_expr(cx: ext_ctxt, sp: span,
+fn pieces_to_expr(cx: @ext_ctxt, sp: span,
                   pieces: ~[Piece], args: ~[@ast::expr])
    -> @ast::expr {
-    fn make_path_vec(cx: ext_ctxt, ident: @~str) -> ~[ast::ident] {
+    fn make_path_vec(cx: @ext_ctxt, ident: @~str) -> ~[ast::ident] {
         let intr = cx.parse_sess().interner;
         return ~[intr.intern(@~"unstable"), intr.intern(@~"extfmt"),
                  intr.intern(@~"rt"), intr.intern(ident)];
     }
-    fn make_rt_path_expr(cx: ext_ctxt, sp: span, nm: @~str) -> @ast::expr {
+    fn make_rt_path_expr(cx: @ext_ctxt, sp: span, nm: @~str) -> @ast::expr {
         let path = make_path_vec(cx, nm);
         return mk_path_global(cx, sp, path);
     }
     // Produces an AST expression that represents a RT::conv record,
     // which tells the RT::conv* functions how to perform the conversion
 
-    fn make_rt_conv_expr(cx: ext_ctxt, sp: span, cnv: Conv) -> @ast::expr {
-        fn make_flags(cx: ext_ctxt, sp: span, flags: ~[Flag]) -> @ast::expr {
+    fn make_rt_conv_expr(cx: @ext_ctxt, sp: span, cnv: Conv) -> @ast::expr {
+        fn make_flags(cx: @ext_ctxt, sp: span, flags: ~[Flag]) -> @ast::expr {
             let mut tmp_expr = make_rt_path_expr(cx, sp, @~"flag_none");
             for flags.each |f| {
                 let fstr = match *f {
@@ -81,7 +81,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
             }
             return tmp_expr;
         }
-        fn make_count(cx: ext_ctxt, sp: span, cnt: Count) -> @ast::expr {
+        fn make_count(cx: @ext_ctxt, sp: span, cnt: Count) -> @ast::expr {
             match cnt {
               CountImplied => {
                 return make_rt_path_expr(cx, sp, @~"CountImplied");
@@ -95,7 +95,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
               _ => cx.span_unimpl(sp, ~"unimplemented fmt! conversion")
             }
         }
-        fn make_ty(cx: ext_ctxt, sp: span, t: Ty) -> @ast::expr {
+        fn make_ty(cx: @ext_ctxt, sp: span, t: Ty) -> @ast::expr {
             let mut rt_type;
             match t {
               TyHex(c) => match c {
@@ -108,7 +108,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
             }
             return make_rt_path_expr(cx, sp, @rt_type);
         }
-        fn make_conv_struct(cx: ext_ctxt, sp: span, flags_expr: @ast::expr,
+        fn make_conv_struct(cx: @ext_ctxt, sp: span, flags_expr: @ast::expr,
                          width_expr: @ast::expr, precision_expr: @ast::expr,
                          ty_expr: @ast::expr) -> @ast::expr {
             let intr = cx.parse_sess().interner;
@@ -139,7 +139,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
         make_conv_struct(cx, sp, rt_conv_flags, rt_conv_width,
                          rt_conv_precision, rt_conv_ty)
     }
-    fn make_conv_call(cx: ext_ctxt, sp: span, conv_type: ~str, cnv: Conv,
+    fn make_conv_call(cx: @ext_ctxt, sp: span, conv_type: ~str, cnv: Conv,
                       arg: @ast::expr) -> @ast::expr {
         let fname = ~"conv_" + conv_type;
         let path = make_path_vec(cx, @fname);
@@ -148,7 +148,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span,
         return mk_call_global(cx, arg.span, path, args);
     }
 
-    fn make_new_conv(cx: ext_ctxt, sp: span, cnv: Conv, arg: @ast::expr) ->
+    fn make_new_conv(cx: @ext_ctxt, sp: span, cnv: Conv, arg: @ast::expr) ->
        @ast::expr {
         // FIXME: Move validation code into core::extfmt (Issue #2249)