[breaking-change] don't pub export ast::IntLitType variants
This commit is contained in:
parent
69072c4f5d
commit
498a2e416e
11 changed files with 42 additions and 43 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue