From 4876eb708c122567a9b4bb47667d14d262b181e4 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 1 Nov 2012 16:47:24 -0700 Subject: Fix #1996 (pending snapshot) Change int to uint in some extfmt code. Remove the #[cfg(stage0)] code after a snapshot. --- src/libsyntax/ext/fmt.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs index e24575f6cd3..71801a4d157 100644 --- a/src/libsyntax/ext/fmt.rs +++ b/src/libsyntax/ext/fmt.rs @@ -71,7 +71,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, return make_rt_path_expr(cx, sp, @~"CountImplied"); } CountIs(c) => { - let count_lit = mk_int(cx, sp, c); + let count_lit = mk_uint(cx, sp, c as uint); let count_is_path = make_path_vec(cx, @~"CountIs"); let count_is_args = ~[count_lit]; return mk_call(cx, sp, count_is_path, count_is_args); @@ -193,7 +193,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, } fn log_conv(c: Conv) { match c.param { - Some(p) => { log(debug, ~"param: " + int::to_str(p, 10u)); } + Some(p) => { log(debug, ~"param: " + p.to_str()); } _ => debug!("param: none") } for c.flags.each |f| { @@ -207,17 +207,17 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, } match c.width { CountIs(i) => log( - debug, ~"width: count is " + int::to_str(i, 10u)), + debug, ~"width: count is " + i.to_str()), CountIsParam(i) => log( - debug, ~"width: count is param " + int::to_str(i, 10u)), + debug, ~"width: count is param " + i.to_str()), CountIsNextParam => debug!("width: count is next param"), CountImplied => debug!("width: count is implied") } match c.precision { CountIs(i) => log( - debug, ~"prec: count is " + int::to_str(i, 10u)), + debug, ~"prec: count is " + i.to_str()), CountIsParam(i) => log( - debug, ~"prec: count is param " + int::to_str(i, 10u)), + debug, ~"prec: count is param " + i.to_str()), CountIsNextParam => debug!("prec: count is next param"), CountImplied => debug!("prec: count is implied") } -- cgit 1.4.1-3-g733a5