From fc9fa1a563c48cc928c8c5754597ffba6f53a635 Mon Sep 17 00:00:00 2001 From: Brian Brooks Date: Sat, 21 Feb 2015 17:26:29 -0500 Subject: Resolve barriers to changing column!() / line!() return type to u32 in #19284 . Address review comments in #21769 . --- src/libsyntax/ext/build.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libsyntax') 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; fn expr_int(&self, sp: Span, i: isize) -> P; + fn expr_u8(&self, sp: Span, u: u8) -> P; fn expr_u32(&self, sp: Span, u: u32) -> P; fn expr_bool(&self, sp: Span, value: bool) -> P; @@ -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 { + self.expr_lit(sp, ast::LitInt(u as u64, ast::UnsignedIntLit(ast::TyU8))) + } fn expr_u32(&self, sp: Span, u: u32) -> P { self.expr_lit(sp, ast::LitInt(u as u64, ast::UnsignedIntLit(ast::TyU32))) } -- cgit 1.4.1-3-g733a5