diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-08 17:16:23 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-11 12:34:48 +0100 |
| commit | 498a2e416e693fa22042d3ae81c5c969fc87fe5c (patch) | |
| tree | 89ea2ea8bf0331d47b38059501df2cede6cdd5bd /src/libsyntax/parse | |
| parent | 69072c4f5d18d7a1762fbfb007b0ba3d6b59ad33 (diff) | |
| download | rust-498a2e416e693fa22042d3ae81c5c969fc87fe5c.tar.gz rust-498a2e416e693fa22042d3ae81c5c969fc87fe5c.zip | |
[breaking-change] don't pub export ast::IntLitType variants
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 22 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index bfd3dea38ce..3d68dcdc6b7 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -586,7 +586,7 @@ pub fn integer_lit(s: &str, let mut base = 10; let orig = s; - let mut ty = ast::UnsuffixedIntLit; + let mut ty = ast::LitIntType::Unsuffixed; if char_at(s, 0) == '0' && s.len() > 1 { match char_at(s, 1) { @@ -618,16 +618,16 @@ pub fn integer_lit(s: &str, if let Some(ref suf) = suffix { if suf.is_empty() { sd.span_bug(sp, "found empty literal suffix in Some")} ty = match &**suf { - "isize" => ast::SignedIntLit(ast::IntTy::Is), - "i8" => ast::SignedIntLit(ast::IntTy::I8), - "i16" => ast::SignedIntLit(ast::IntTy::I16), - "i32" => ast::SignedIntLit(ast::IntTy::I32), - "i64" => ast::SignedIntLit(ast::IntTy::I64), - "usize" => ast::UnsignedIntLit(ast::UintTy::Us), - "u8" => ast::UnsignedIntLit(ast::UintTy::U8), - "u16" => ast::UnsignedIntLit(ast::UintTy::U16), - "u32" => ast::UnsignedIntLit(ast::UintTy::U32), - "u64" => ast::UnsignedIntLit(ast::UintTy::U64), + "isize" => ast::LitIntType::Signed(ast::IntTy::Is), + "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), + "usize" => ast::LitIntType::Unsigned(ast::UintTy::Us), + "u8" => ast::LitIntType::Unsigned(ast::UintTy::U8), + "u16" => ast::LitIntType::Unsigned(ast::UintTy::U16), + "u32" => ast::LitIntType::Unsigned(ast::UintTy::U32), + "u64" => ast::LitIntType::Unsigned(ast::UintTy::U64), _ => { // i<digits> and u<digits> look like widths, so lets // give an error message along those lines diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d3b92ac0c0c..85a5b5b3068 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2014,7 +2014,7 @@ impl<'a> Parser<'a> { pub fn mk_lit_u32(&mut self, i: u32, attrs: ThinAttributes) -> P<Expr> { let span = &self.span; let lv_lit = P(codemap::Spanned { - node: LitKind::Int(i as u64, ast::UnsignedIntLit(UintTy::U32)), + node: LitKind::Int(i as u64, ast::LitIntType::Unsigned(UintTy::U32)), span: *span }); |
