diff options
| author | Brian Brooks <brooks.brian@gmail.com> | 2015-02-21 17:26:29 -0500 |
|---|---|---|
| committer | Brian Brooks <brooks.brian@gmail.com> | 2015-02-21 17:26:29 -0500 |
| commit | fc9fa1a563c48cc928c8c5754597ffba6f53a635 (patch) | |
| tree | c8b6dce437b1f392a9508ffa32b4538c553794b7 /src/libsyntax/ext/build.rs | |
| parent | 1212fd8abc7602f6c506c936908a799c76549a14 (diff) | |
| download | rust-fc9fa1a563c48cc928c8c5754597ffba6f53a635.tar.gz rust-fc9fa1a563c48cc928c8c5754597ffba6f53a635.zip | |
Resolve barriers to changing column!() / line!() return type to u32 in #19284 . Address review comments in #21769 .
Diffstat (limited to 'src/libsyntax/ext/build.rs')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 454c21fdc57..7ba045f0eb0 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -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))) } |
