summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-02-26 14:34:00 -0500
committerNiko Matsakis <niko@alum.mit.edu>2013-03-06 15:12:57 -0500
commit3168fe06ff69970be329583f560a3ccd9c00c874 (patch)
tree1c84b080a887c23434f4049fd701413d7b2a49af /src/libsyntax/ext
parent876b6ba792f83f1b50d1356e7305f334b5ba2f05 (diff)
downloadrust-3168fe06ff69970be329583f560a3ccd9c00c874.tar.gz
rust-3168fe06ff69970be329583f560a3ccd9c00c874.zip
Add manual &self/ and &static/ and /&self declarations that
are currently inferred.  New rules are coming that will require
them to be explicit.  All add some explicit self declarations.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/deriving.rs22
-rw-r--r--src/libsyntax/ext/expand.rs9
2 files changed, 15 insertions, 16 deletions
diff --git a/src/libsyntax/ext/deriving.rs b/src/libsyntax/ext/deriving.rs
index 07896236442..8c12bbad360 100644
--- a/src/libsyntax/ext/deriving.rs
+++ b/src/libsyntax/ext/deriving.rs
@@ -46,18 +46,16 @@ pub impl Junction {
     }
 }
 
-type ExpandDerivingStructDefFn = &fn(ext_ctxt,
-                                     span,
-                                     x: &struct_def,
-                                     ident,
-                                     y: &Generics)
-                                  -> @item;
-type ExpandDerivingEnumDefFn = &fn(ext_ctxt,
-                                   span,
-                                   x: &enum_def,
-                                   ident,
-                                   y: &Generics)
-                                -> @item;
+type ExpandDerivingStructDefFn = &self/fn(ext_ctxt,
+                                          span,
+                                          x: &struct_def,
+                                          ident,
+                                          y: &Generics) -> @item;
+type ExpandDerivingEnumDefFn = &self/fn(ext_ctxt,
+                                        span,
+                                        x: &enum_def,
+                                        ident,
+                                        y: &Generics) -> @item;
 
 pub fn expand_deriving_eq(cx: ext_ctxt,
                           span: span,
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 03633a89a86..7b4f92ab3ca 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -442,11 +442,12 @@ pub fn core_macros() -> ~str {
             mod $c {
                 fn key(_x: @::core::condition::Handler<$in,$out>) { }
 
-                pub const cond : ::core::condition::Condition<$in,$out> =
+                pub const cond :
+                    ::core::condition::Condition/&static<$in,$out> =
                     ::core::condition::Condition {
-                    name: stringify!($c),
-                    key: key
-                };
+                        name: stringify!($c),
+                        key: key
+                    };
             }
         }
     )