diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-09-16 23:34:40 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-18 11:07:22 -0700 |
| commit | 817576ee7001244da68a4ee315ebdc1163d4e648 (patch) | |
| tree | ffa6ecd790e899105cfa3f2c2da1b4520a062f72 /src/libsyntax/ext | |
| parent | e02313a172acca34bd29e10cdd10f7495664694e (diff) | |
| download | rust-817576ee7001244da68a4ee315ebdc1163d4e648.tar.gz rust-817576ee7001244da68a4ee315ebdc1163d4e648.zip | |
Register new snapshots
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 14 | ||||
| -rw-r--r-- | src/libsyntax/ext/env.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 10 |
3 files changed, 2 insertions, 34 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 6cb5a93a313..889c2a5976e 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -644,25 +644,11 @@ impl AstBuilder for @ExtCtxt { self.expr(span, ast::ExprFnBlock(fn_decl, blk)) } - #[cfg(stage0)] - fn lambda0(&self, _span: Span, blk: ast::Block) -> @ast::Expr { - let ext_cx = *self; - let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone())); - quote_expr!(|| $blk_e ) - } - #[cfg(not(stage0))] fn lambda0(&self, _span: Span, blk: ast::Block) -> @ast::Expr { let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone())); quote_expr!(*self, || $blk_e ) } - #[cfg(stage0)] - fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::Expr { - let ext_cx = *self; - let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone())); - quote_expr!(|$ident| $blk_e ) - } - #[cfg(not(stage0))] fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::Expr { let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone())); quote_expr!(*self, |$ident| $blk_e ) diff --git a/src/libsyntax/ext/env.rs b/src/libsyntax/ext/env.rs index ac8a7d513dd..e97af9cbfb1 100644 --- a/src/libsyntax/ext/env.rs +++ b/src/libsyntax/ext/env.rs @@ -22,18 +22,6 @@ use ext::build::AstBuilder; use std::os; -#[cfg(stage0)] -pub fn expand_option_env(ext_cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree]) - -> base::MacResult { - let var = get_single_str_from_tts(ext_cx, sp, tts, "option_env!"); - - let e = match os::getenv(var) { - None => quote_expr!(::std::option::None::<&'static str>), - Some(s) => quote_expr!(::std::option::Some($s)) - }; - MRExpr(e) -} -#[cfg(not(stage0))] pub fn expand_option_env(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree]) -> base::MacResult { let var = get_single_str_from_tts(cx, sp, tts, "option_env!"); diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index ac094c27a81..7254e8e775a 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -863,9 +863,7 @@ pub fn std_macros() -> @str { use super::*; - static key: ::std::local_data::Key< - @::std::condition::Handler<$input, $out>> = - &::std::local_data::Key; + local_data_key!(key: @::std::condition::Handler<$input, $out>) pub static cond : ::std::condition::Condition<$input,$out> = @@ -884,9 +882,7 @@ pub fn std_macros() -> @str { use super::*; - static key: ::std::local_data::Key< - @::std::condition::Handler<$input, $out>> = - &::std::local_data::Key; + local_data_key!(key: @::std::condition::Handler<$input, $out>) pub static cond : ::std::condition::Condition<$input,$out> = @@ -975,8 +971,6 @@ pub fn std_macros() -> @str { ($($arg:tt)*) => (::std::io::println(format!($($arg)*))) ) - // NOTE: use this after a snapshot lands to abstract the details - // of the TLS interface. macro_rules! local_data_key ( ($name:ident: $ty:ty) => ( static $name: ::std::local_data::Key<$ty> = &::std::local_data::Key; |
