diff options
| author | bors <bors@rust-lang.org> | 2015-03-27 23:11:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-27 23:11:21 +0000 |
| commit | 552080181c58beef03493a110b4a38b20b6b5da5 (patch) | |
| tree | 3dbfd8c87647f67e1d17c726e72b153609d7eea8 /src/libsyntax/ext | |
| parent | 0c9de8140b8abdd2d0a83db93746c58e8bc0da2c (diff) | |
| parent | d3a4f362cba36a4bf0bb8f8a951ae9d6858ae73e (diff) | |
| download | rust-552080181c58beef03493a110b4a38b20b6b5da5.tar.gz rust-552080181c58beef03493a110b4a38b20b6b5da5.zip | |
Auto merge of #23796 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 9 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index d916651b056..5d0853761ee 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -696,10 +696,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self.expr(sp, ast::ExprLit(P(respan(sp, lit)))) } fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> { - self.expr_lit(span, ast::LitInt(i as u64, ast::UnsignedIntLit(ast::TyUs(false)))) + self.expr_lit(span, ast::LitInt(i as u64, ast::UnsignedIntLit(ast::TyUs))) } fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr> { - self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs(false), + self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs, ast::Sign::new(i)))) } fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr> { diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 0c5e4d67642..397775fdbfe 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -1163,7 +1163,7 @@ impl<'a> MethodDef<'a> { let arms: Vec<ast::Arm> = variants.iter().enumerate() .map(|(index, variant)| { let pat = variant_to_pat(cx, sp, type_ident, &**variant); - let lit = ast::LitInt(index as u64, ast::UnsignedIntLit(ast::TyUs(false))); + let lit = ast::LitInt(index as u64, ast::UnsignedIntLit(ast::TyUs)); cx.arm(sp, vec![pat], cx.expr_lit(sp, lit)) }).collect(); diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 5bbcdea879d..87299721fb3 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -264,7 +264,6 @@ 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)) } @@ -277,13 +276,13 @@ pub mod rt { ); } - impl_to_source_int! { signed, int, ast::TyIs(false) } + impl_to_source_int! { signed, isize, ast::TyIs } impl_to_source_int! { signed, i8, ast::TyI8 } impl_to_source_int! { signed, i16, ast::TyI16 } impl_to_source_int! { signed, i32, ast::TyI32 } impl_to_source_int! { signed, i64, ast::TyI64 } - impl_to_source_int! { unsigned, uint, ast::TyUs(false) } + impl_to_source_int! { unsigned, usize, ast::TyUs } impl_to_source_int! { unsigned, u8, ast::TyU8 } impl_to_source_int! { unsigned, u16, ast::TyU16 } impl_to_source_int! { unsigned, u32, ast::TyU32 } @@ -332,12 +331,12 @@ pub mod rt { impl_to_tokens! { () } impl_to_tokens! { char } impl_to_tokens! { bool } - impl_to_tokens! { int } + impl_to_tokens! { isize } impl_to_tokens! { i8 } impl_to_tokens! { i16 } impl_to_tokens! { i32 } impl_to_tokens! { i64 } - impl_to_tokens! { uint } + impl_to_tokens! { usize } impl_to_tokens! { u8 } impl_to_tokens! { u16 } impl_to_tokens! { u32 } |
