[breaking-change] don't pub export ast::IntLitType variants

This commit is contained in:
Oliver Schneider
2016-02-08 17:16:23 +01:00
parent 69072c4f5d
commit 498a2e416e
11 changed files with 42 additions and 43 deletions

View File

@@ -680,7 +680,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
self.expr(sp, ast::ExprKind::Lit(P(respan(sp, lit))))
}
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> {
self.expr_lit(span, ast::LitKind::Int(i as u64, ast::UnsignedIntLit(ast::UintTy::Us)))
self.expr_lit(span, ast::LitKind::Int(i as u64, ast::LitIntType::Unsigned(ast::UintTy::Us)))
}
fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr> {
if i < 0 {
@@ -689,14 +689,14 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
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 u64, ast::SignedIntLit(ast::IntTy::Is)))
self.expr_lit(sp, ast::LitKind::Int(i as u64, ast::LitIntType::Signed(ast::IntTy::Is)))
}
}
fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr> {
self.expr_lit(sp, ast::LitKind::Int(u as u64, ast::UnsignedIntLit(ast::UintTy::U32)))
self.expr_lit(sp, ast::LitKind::Int(u as u64, ast::LitIntType::Unsigned(ast::UintTy::U32)))
}
fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr> {
self.expr_lit(sp, ast::LitKind::Int(u as u64, ast::UnsignedIntLit(ast::UintTy::U8)))
self.expr_lit(sp, ast::LitKind::Int(u as u64, ast::LitIntType::Unsigned(ast::UintTy::U8)))
}
fn expr_bool(&self, sp: Span, value: bool) -> P<ast::Expr> {
self.expr_lit(sp, ast::LitKind::Bool(value))

View File

@@ -268,7 +268,7 @@ pub mod rt {
} else {
*self
};
let lit = ast::LitKind::Int(val as u64, ast::SignedIntLit($tag));
let lit = ast::LitKind::Int(val as u64, ast::LitIntType::Signed($tag));
let lit = P(ast::Expr {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Lit(P(dummy_spanned(lit))),
@@ -290,7 +290,7 @@ pub mod rt {
(unsigned, $t:ty, $tag:expr) => (
impl ToTokens for $t {
fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree> {
let lit = ast::LitKind::Int(*self as u64, ast::UnsignedIntLit($tag));
let lit = ast::LitKind::Int(*self as u64, ast::LitIntType::Unsigned($tag));
dummy_spanned(lit).to_tokens(cx)
}
}