diff options
| author | bors <bors@rust-lang.org> | 2018-01-06 20:41:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-06 20:41:33 +0000 |
| commit | 6828cf90146c7fefc4ba4f16dffe75f763f2d910 (patch) | |
| tree | 44e745909b8c8bfc2808bacc08f5aeee4916e65e /src/libsyntax | |
| parent | 72176cf96cb79a0ebf62972b76dbe68c933bef4d (diff) | |
| parent | ce701061384bae7c3b9873460c1c5df8204431fc (diff) | |
| download | rust-6828cf90146c7fefc4ba4f16dffe75f763f2d910.tar.gz rust-6828cf90146c7fefc4ba4f16dffe75f763f2d910.zip | |
Auto merge of #47235 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests - Successful merges: #46947, #47170, #47190, #47205, #47217, #47220, #47230 - Failed merges: #47233
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/attr.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 15682b2d459..e08a2cbfd08 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1324,7 +1324,7 @@ pub enum ImplItemKind { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy, PartialOrd, Ord)] pub enum IntTy { - Is, + Isize, I8, I16, I32, @@ -1347,7 +1347,7 @@ impl fmt::Display for IntTy { impl IntTy { pub fn ty_to_string(&self) -> &'static str { match *self { - IntTy::Is => "isize", + IntTy::Isize => "isize", IntTy::I8 => "i8", IntTy::I16 => "i16", IntTy::I32 => "i32", @@ -1365,7 +1365,7 @@ impl IntTy { pub fn bit_width(&self) -> Option<usize> { Some(match *self { - IntTy::Is => return None, + IntTy::Isize => return None, IntTy::I8 => 8, IntTy::I16 => 16, IntTy::I32 => 32, @@ -1378,7 +1378,7 @@ impl IntTy { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy, PartialOrd, Ord)] pub enum UintTy { - Us, + Usize, U8, U16, U32, @@ -1389,7 +1389,7 @@ pub enum UintTy { impl UintTy { pub fn ty_to_string(&self) -> &'static str { match *self { - UintTy::Us => "usize", + UintTy::Usize => "usize", UintTy::U8 => "u8", UintTy::U16 => "u16", UintTy::U32 => "u32", @@ -1404,7 +1404,7 @@ impl UintTy { pub fn bit_width(&self) -> Option<usize> { Some(match *self { - UintTy::Us => return None, + UintTy::Usize => return None, UintTy::U8 => 8, UintTy::U16 => 16, UintTy::U32 => 32, diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index cc72ff7d15d..0b868b514fe 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -1071,8 +1071,8 @@ fn int_type_of_word(s: &str) -> Option<IntType> { "u64" => Some(UnsignedInt(ast::UintTy::U64)), "i128" => Some(SignedInt(ast::IntTy::I128)), "u128" => Some(UnsignedInt(ast::UintTy::U128)), - "isize" => Some(SignedInt(ast::IntTy::Is)), - "usize" => Some(UnsignedInt(ast::UintTy::Us)), + "isize" => Some(SignedInt(ast::IntTy::Isize)), + "usize" => Some(UnsignedInt(ast::UintTy::Usize)), _ => None } } diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 34e5610901e..be0bfd6677b 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -694,17 +694,17 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> { self.expr_lit(span, ast::LitKind::Int(i as u128, - ast::LitIntType::Unsigned(ast::UintTy::Us))) + ast::LitIntType::Unsigned(ast::UintTy::Usize))) } fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr> { if i < 0 { let i = (-i) as u128; - let lit_ty = ast::LitIntType::Signed(ast::IntTy::Is); + let lit_ty = ast::LitIntType::Signed(ast::IntTy::Isize); let lit = self.expr_lit(sp, ast::LitKind::Int(i, lit_ty)); self.expr_unary(sp, ast::UnOp::Neg, lit) } else { self.expr_lit(sp, ast::LitKind::Int(i as u128, - ast::LitIntType::Signed(ast::IntTy::Is))) + ast::LitIntType::Signed(ast::IntTy::Isize))) } } fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr> { diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 59996d1e4a7..7fcd88c94ca 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -326,13 +326,13 @@ pub mod rt { ); } - impl_to_tokens_int! { signed, isize, ast::IntTy::Is } + impl_to_tokens_int! { signed, isize, ast::IntTy::Isize } impl_to_tokens_int! { signed, i8, ast::IntTy::I8 } impl_to_tokens_int! { signed, i16, ast::IntTy::I16 } impl_to_tokens_int! { signed, i32, ast::IntTy::I32 } impl_to_tokens_int! { signed, i64, ast::IntTy::I64 } - impl_to_tokens_int! { unsigned, usize, ast::UintTy::Us } + impl_to_tokens_int! { unsigned, usize, ast::UintTy::Usize } impl_to_tokens_int! { unsigned, u8, ast::UintTy::U8 } impl_to_tokens_int! { unsigned, u16, ast::UintTy::U16 } impl_to_tokens_int! { unsigned, u32, ast::UintTy::U32 } diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index a38ceba2f45..a9b1e4aaa60 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -603,13 +603,13 @@ pub fn integer_lit(s: &str, suffix: Option<Symbol>, diag: Option<(Span, &Handler err!(diag, |span, diag| diag.span_bug(span, "found empty literal suffix in Some")); } ty = match &*suf.as_str() { - "isize" => ast::LitIntType::Signed(ast::IntTy::Is), + "isize" => ast::LitIntType::Signed(ast::IntTy::Isize), "i8" => ast::LitIntType::Signed(ast::IntTy::I8), "i16" => ast::LitIntType::Signed(ast::IntTy::I16), "i32" => ast::LitIntType::Signed(ast::IntTy::I32), "i64" => ast::LitIntType::Signed(ast::IntTy::I64), "i128" => ast::LitIntType::Signed(ast::IntTy::I128), - "usize" => ast::LitIntType::Unsigned(ast::UintTy::Us), + "usize" => ast::LitIntType::Unsigned(ast::UintTy::Usize), "u8" => ast::LitIntType::Unsigned(ast::UintTy::U8), "u16" => ast::LitIntType::Unsigned(ast::UintTy::U16), "u32" => ast::LitIntType::Unsigned(ast::UintTy::U32), |
