From 3168fe06ff69970be329583f560a3ccd9c00c874 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 26 Feb 2013 14:34:00 -0500 Subject: 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. --- src/libsyntax/ext/deriving.rs | 22 ++++++++++------------ src/libsyntax/ext/expand.rs | 9 +++++---- 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'src/libsyntax/ext') 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 + }; } } ) -- cgit 1.4.1-3-g733a5