rustc: Remove support for int/uint

This commit removes all parsing, resolve, and compiler support for the old and
long-deprecated int/uint types.
This commit is contained in:
Alex Crichton 2015-03-24 13:26:16 -07:00
parent a923278c62
commit 54f16b818b
22 changed files with 71 additions and 166 deletions

View file

@ -700,18 +700,18 @@ pub fn integer_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) ->
if let Some(suf) = suffix {
if suf.is_empty() { sd.span_bug(sp, "found empty literal suffix in Some")}
ty = match suf {
"isize" => ast::SignedIntLit(ast::TyIs(false), ast::Plus),
"isize" => ast::SignedIntLit(ast::TyIs, ast::Plus),
"i8" => ast::SignedIntLit(ast::TyI8, ast::Plus),
"i16" => ast::SignedIntLit(ast::TyI16, ast::Plus),
"i32" => ast::SignedIntLit(ast::TyI32, ast::Plus),
"i64" => ast::SignedIntLit(ast::TyI64, ast::Plus),
"usize" => ast::UnsignedIntLit(ast::TyUs(false)),
"usize" => ast::UnsignedIntLit(ast::TyUs),
"u8" => ast::UnsignedIntLit(ast::TyU8),
"u16" => ast::UnsignedIntLit(ast::TyU16),
"u32" => ast::UnsignedIntLit(ast::TyU32),
"u64" => ast::UnsignedIntLit(ast::TyU64),
"i" | "is" => ast::SignedIntLit(ast::TyIs(true), ast::Plus),
"u" | "us" => ast::UnsignedIntLit(ast::TyUs(true)),
"is" => ast::SignedIntLit(ast::TyIs, ast::Plus),
"us" => ast::UnsignedIntLit(ast::TyUs),
_ => {
// i<digits> and u<digits> look like widths, so lets
// give an error message along those lines