diff options
| author | bors <bors@rust-lang.org> | 2015-03-25 01:42:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-25 01:42:42 +0000 |
| commit | 593db005d4dbce2ff72009c1ba03477b031b2c0f (patch) | |
| tree | b585f5625dde7ab0af35fb3dd41a67ba0507f525 /src/libsyntax/ext | |
| parent | 123a754cb8356d0e78837dd4e58103ad801309ff (diff) | |
| parent | 3021d4c56422e15331e38f4b7b04c7229e024fda (diff) | |
| download | rust-593db005d4dbce2ff72009c1ba03477b031b2c0f.tar.gz rust-593db005d4dbce2ff72009c1ba03477b031b2c0f.zip | |
Auto merge of #23681 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 35449bde0b2..b679456b353 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -264,7 +264,7 @@ macro_rules! make_MacEager { box MacEager { $fld: Some(v), ..Default::default() - } as Box<MacResult> + } } )* } @@ -330,7 +330,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 } as Box<MacResult+'static> + box DummyResult { expr_only: false, span: sp } } /// Create a default MacResult that can only be an expression. @@ -339,7 +339,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 } as Box<MacResult+'static> + box DummyResult { expr_only: true, span: sp } } /// A plain dummy expression. diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index c11ffe66e6c..a25a6451918 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -262,6 +262,7 @@ pub mod rt { (unsigned, $t:ty, $tag:expr) => ( impl ToSource for $t { fn to_source(&self) -> String { + #![allow(trivial_numeric_casts)] let lit = ast::LitInt(*self as u64, ast::UnsignedIntLit($tag)); pprust::lit_to_string(&dummy_spanned(lit)) } diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 5940b791843..1e53db60301 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -169,7 +169,7 @@ fn generic_extension<'cx>(cx: &'cx ExtCtxt, // Weird, but useful for X-macros. return box ParserAnyMacro { parser: RefCell::new(p), - } as Box<MacResult+'cx> + } } Failure(sp, ref msg) => if sp.lo >= best_fail_spot.lo { best_fail_spot = sp; |
