@@ -35,7 +35,7 @@ pub struct MacroDef {
3535 ext : SyntaxExtension
3636}
3737
38- pub type ItemDecorator = extern "Rust" fn ( @ ExtCtxt ,
38+ pub type ItemDecorator = extern "Rust" fn ( & ExtCtxt ,
3939 Span ,
4040 @ast:: MetaItem ,
4141 ~[ @ast:: item ] )
@@ -48,15 +48,15 @@ pub struct SyntaxExpanderTT {
4848
4949pub trait SyntaxExpanderTTTrait {
5050 fn expand ( & self ,
51- ecx : @ ExtCtxt ,
51+ ecx : & ExtCtxt ,
5252 span : Span ,
5353 token_tree : & [ ast:: token_tree ] ,
5454 context : ast:: SyntaxContext )
5555 -> MacResult ;
5656}
5757
5858pub type SyntaxExpanderTTFunNoCtxt =
59- extern "Rust" fn ( ecx : @ ExtCtxt ,
59+ extern "Rust" fn ( ecx : & ExtCtxt ,
6060 span : codemap:: Span ,
6161 token_tree : & [ ast:: token_tree ] )
6262 -> MacResult ;
@@ -67,7 +67,7 @@ enum SyntaxExpanderTTExpander {
6767
6868impl SyntaxExpanderTTTrait for SyntaxExpanderTT {
6969 fn expand ( & self ,
70- ecx : @ ExtCtxt ,
70+ ecx : & ExtCtxt ,
7171 span : Span ,
7272 token_tree : & [ ast:: token_tree ] ,
7373 _: ast:: SyntaxContext )
@@ -92,7 +92,7 @@ pub struct SyntaxExpanderTTItem {
9292
9393pub trait SyntaxExpanderTTItemTrait {
9494 fn expand ( & self ,
95- cx : @ ExtCtxt ,
95+ cx : & ExtCtxt ,
9696 sp : Span ,
9797 ident : ast:: Ident ,
9898 token_tree : ~[ ast:: token_tree ] ,
@@ -102,7 +102,7 @@ pub trait SyntaxExpanderTTItemTrait {
102102
103103impl SyntaxExpanderTTItemTrait for SyntaxExpanderTTItem {
104104 fn expand ( & self ,
105- cx : @ ExtCtxt ,
105+ cx : & ExtCtxt ,
106106 sp : Span ,
107107 ident : ast:: Ident ,
108108 token_tree : ~[ ast:: token_tree ] ,
@@ -119,15 +119,15 @@ impl SyntaxExpanderTTItemTrait for SyntaxExpanderTTItem {
119119 }
120120}
121121
122- pub type SyntaxExpanderTTItemFun = extern "Rust" fn ( @ ExtCtxt ,
122+ pub type SyntaxExpanderTTItemFun = extern "Rust" fn ( & ExtCtxt ,
123123 Span ,
124124 ast:: Ident ,
125125 ~[ ast:: token_tree ] ,
126126 ast:: SyntaxContext )
127127 -> MacResult ;
128128
129129pub type SyntaxExpanderTTItemFunNoCtxt =
130- extern "Rust" fn ( @ ExtCtxt , Span , ast:: Ident , ~[ ast:: token_tree ] )
130+ extern "Rust" fn ( & ExtCtxt , Span , ast:: Ident , ~[ ast:: token_tree ] )
131131 -> MacResult ;
132132
133133pub trait AnyMacro {
@@ -319,8 +319,8 @@ pub struct ExtCtxt {
319319
320320impl ExtCtxt {
321321 pub fn new ( parse_sess : @mut parse:: ParseSess , cfg : ast:: CrateConfig )
322- -> @ ExtCtxt {
323- @ ExtCtxt {
322+ -> ExtCtxt {
323+ ExtCtxt {
324324 parse_sess : parse_sess,
325325 cfg : cfg,
326326 backtrace : @mut None ,
@@ -329,7 +329,7 @@ impl ExtCtxt {
329329 }
330330 }
331331
332- pub fn expand_expr ( @ self , mut e : @ast:: Expr ) -> @ast:: Expr {
332+ pub fn expand_expr ( & self , mut e : @ast:: Expr ) -> @ast:: Expr {
333333 loop {
334334 match e. node {
335335 ast:: ExprMac ( ..) => {
@@ -417,7 +417,7 @@ impl ExtCtxt {
417417 }
418418}
419419
420- pub fn expr_to_str ( cx : @ ExtCtxt , expr : @ast:: Expr , err_msg : & str ) -> ( @str , ast:: StrStyle ) {
420+ pub fn expr_to_str ( cx : & ExtCtxt , expr : @ast:: Expr , err_msg : & str ) -> ( @str , ast:: StrStyle ) {
421421 match expr. node {
422422 ast:: ExprLit ( l) => match l. node {
423423 ast:: lit_str( s, style) => ( s, style) ,
@@ -427,14 +427,14 @@ pub fn expr_to_str(cx: @ExtCtxt, expr: @ast::Expr, err_msg: &str) -> (@str, ast:
427427 }
428428}
429429
430- pub fn check_zero_tts ( cx : @ ExtCtxt , sp : Span , tts : & [ ast:: token_tree ] ,
430+ pub fn check_zero_tts ( cx : & ExtCtxt , sp : Span , tts : & [ ast:: token_tree ] ,
431431 name : & str ) {
432432 if tts. len ( ) != 0 {
433433 cx. span_fatal ( sp, format ! ( "{} takes no arguments" , name) ) ;
434434 }
435435}
436436
437- pub fn get_single_str_from_tts ( cx : @ ExtCtxt ,
437+ pub fn get_single_str_from_tts ( cx : & ExtCtxt ,
438438 sp : Span ,
439439 tts : & [ ast:: token_tree ] ,
440440 name : & str )
@@ -450,7 +450,7 @@ pub fn get_single_str_from_tts(cx: @ExtCtxt,
450450 }
451451}
452452
453- pub fn get_exprs_from_tts ( cx : @ ExtCtxt ,
453+ pub fn get_exprs_from_tts ( cx : & ExtCtxt ,
454454 sp : Span ,
455455 tts : & [ ast:: token_tree ] ) -> ~[ @ast:: Expr ] {
456456 let p = parse:: new_parser_from_tts ( cx. parse_sess ( ) ,
0 commit comments