diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:23:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:23:07 -0700 |
| commit | 37a1f2e3acc75e8a3d0fd47bb345b2cd880b2937 (patch) | |
| tree | 0e9af466fc2c1f4185b87f29ffe71a86ad5bcaa9 /src/libsyntax/ext/base.rs | |
| parent | 957cb422a98585568558ad88ec5a0841c43961ae (diff) | |
| parent | 19c8d701743922a709a4eb6554f562996b7baa27 (diff) | |
| download | rust-37a1f2e3acc75e8a3d0fd47bb345b2cd880b2937.tar.gz rust-37a1f2e3acc75e8a3d0fd47bb345b2cd880b2937.zip | |
rollup merge of #24487: erickt/syntax
This removes the usage of `#[feature(into_cow, slice_patterns, box_syntax, box_patterns, quote, unsafe_destructor)]` from being used in libsyntax. My main desire for this is that it brings me one step closer to letting [syntex](https://github.com/erickt/rust-syntex) compile with stable rust. Hopefully this doesn't inconvenience rust development.
Diffstat (limited to 'src/libsyntax/ext/base.rs')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 55afac1a1de..50ab430f148 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -262,10 +262,10 @@ macro_rules! make_MacEager { impl MacEager { $( pub fn $fld(v: $t) -> Box<MacResult> { - box MacEager { + Box::new(MacEager { $fld: Some(v), ..Default::default() - } + }) } )* } @@ -331,7 +331,7 @@ impl DummyResult { /// Use this as a return value after hitting any errors and /// calling `span_err`. pub fn any(sp: Span) -> Box<MacResult+'static> { - box DummyResult { expr_only: false, span: sp } + Box::new(DummyResult { expr_only: false, span: sp }) } /// Create a default MacResult that can only be an expression. @@ -340,7 +340,7 @@ impl DummyResult { /// if an error is encountered internally, the user will receive /// an error that they also used it in the wrong place. pub fn expr(sp: Span) -> Box<MacResult+'static> { - box DummyResult { expr_only: true, span: sp } + Box::new(DummyResult { expr_only: true, span: sp }) } /// A plain dummy expression. |
