diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-01-08 20:13:14 +1100 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-01-08 11:02:23 -0500 |
| commit | e95779554e9d6fc111102df7af80b40f8e22cfae (patch) | |
| tree | e838385272c295d7cdab1ae32193ec4ebe3bd5af /src/libsyntax/ext/quote.rs | |
| parent | 2f99a41fe1a27a48e96bc2616ec9faa6de924386 (diff) | |
| download | rust-e95779554e9d6fc111102df7af80b40f8e22cfae.tar.gz rust-e95779554e9d6fc111102df7af80b40f8e22cfae.zip | |
Store deprecated status of i/u-suffixed literals.
Diffstat (limited to 'src/libsyntax/ext/quote.rs')
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 2dbf29c145c..c42b188302c 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -244,10 +244,10 @@ pub mod rt { } macro_rules! impl_to_source_int { - (signed, $t:ty, $tag:ident) => ( + (signed, $t:ty, $tag:expr) => ( impl ToSource for $t { fn to_source(&self) -> String { - let lit = ast::LitInt(*self as u64, ast::SignedIntLit(ast::$tag, + let lit = ast::LitInt(*self as u64, ast::SignedIntLit($tag, ast::Sign::new(*self))); pprust::lit_to_string(&dummy_spanned(lit)) } @@ -258,10 +258,10 @@ pub mod rt { } } ); - (unsigned, $t:ty, $tag:ident) => ( + (unsigned, $t:ty, $tag:expr) => ( impl ToSource for $t { fn to_source(&self) -> String { - let lit = ast::LitInt(*self as u64, ast::UnsignedIntLit(ast::$tag)); + let lit = ast::LitInt(*self as u64, ast::UnsignedIntLit($tag)); pprust::lit_to_string(&dummy_spanned(lit)) } } @@ -273,17 +273,17 @@ pub mod rt { ); } - impl_to_source_int! { signed, int, TyIs } - impl_to_source_int! { signed, i8, TyI8 } - impl_to_source_int! { signed, i16, TyI16 } - impl_to_source_int! { signed, i32, TyI32 } - impl_to_source_int! { signed, i64, TyI64 } + impl_to_source_int! { signed, int, ast::TyIs(false) } + 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, TyUs } - impl_to_source_int! { unsigned, u8, TyU8 } - impl_to_source_int! { unsigned, u16, TyU16 } - impl_to_source_int! { unsigned, u32, TyU32 } - impl_to_source_int! { unsigned, u64, TyU64 } + impl_to_source_int! { unsigned, uint, ast::TyUs(false) } + impl_to_source_int! { unsigned, u8, ast::TyU8 } + impl_to_source_int! { unsigned, u16, ast::TyU16 } + impl_to_source_int! { unsigned, u32, ast::TyU32 } + impl_to_source_int! { unsigned, u64, ast::TyU64 } // Alas ... we write these out instead. All redundant. |
