Resolve barriers to changing column!() / line!() return type to u32 in #19284 . Address review comments in #21769 .
This commit is contained in:
parent
1212fd8abc
commit
fc9fa1a563
9 changed files with 64 additions and 15 deletions
|
|
@ -147,6 +147,7 @@ pub trait AstBuilder {
|
|||
|
||||
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr>;
|
||||
fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr>;
|
||||
fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr>;
|
||||
fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr>;
|
||||
fn expr_bool(&self, sp: Span, value: bool) -> P<ast::Expr>;
|
||||
|
||||
|
|
@ -701,6 +702,9 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
|
|||
self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs(false),
|
||||
ast::Sign::new(i))))
|
||||
}
|
||||
fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr> {
|
||||
self.expr_lit(sp, ast::LitInt(u as u64, ast::UnsignedIntLit(ast::TyU8)))
|
||||
}
|
||||
fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr> {
|
||||
self.expr_lit(sp, ast::LitInt(u as u64, ast::UnsignedIntLit(ast::TyU32)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue