diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-03-08 12:39:42 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-03-11 23:19:42 -0700 |
| commit | 82f190355b07f941bcc98408ea84c02b629991cf (patch) | |
| tree | 3f6f1c768cb9e4708aff36b5d720805162d95a8b /src/libsyntax | |
| parent | 2fef18abf2b6a9b3c336b1da5b8a08a22438ad4c (diff) | |
| download | rust-82f190355b07f941bcc98408ea84c02b629991cf.tar.gz rust-82f190355b07f941bcc98408ea84c02b629991cf.zip | |
Remove uses of log
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/fmt.rs | 21 | ||||
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/print/pp.rs | 2 |
3 files changed, 13 insertions, 14 deletions
diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs index af558e6b330..ee0de9e48db 100644 --- a/src/libsyntax/ext/fmt.rs +++ b/src/libsyntax/ext/fmt.rs @@ -37,8 +37,7 @@ pub fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: &[ast::token_tree]) expr_to_str(cx, args[0], ~"first argument to fmt! must be a string literal."); let fmtspan = args[0].span; - debug!("Format string:"); - log(debug, fmt); + debug!("Format string: %s", fmt); fn parse_fmt_err_(cx: ext_ctxt, sp: span, msg: &str) -> ! { cx.span_fatal(sp, msg); } @@ -223,7 +222,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, } fn log_conv(c: Conv) { match c.param { - Some(p) => { log(debug, ~"param: " + p.to_str()); } + Some(p) => { debug!("param: %s", p.to_str()); } _ => debug!("param: none") } for c.flags.each |f| { @@ -236,18 +235,18 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, } } match c.width { - CountIs(i) => log( - debug, ~"width: count is " + i.to_str()), - CountIsParam(i) => log( - debug, ~"width: count is param " + i.to_str()), + CountIs(i) => + debug!("width: count is %s", i.to_str()), + CountIsParam(i) => + debug!("width: count is param %s", 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 " + i.to_str()), - CountIsParam(i) => log( - debug, ~"prec: count is param " + i.to_str()), + CountIs(i) => + debug!("prec: count is %s", i.to_str()), + CountIsParam(i) => + debug!("prec: count is param %s", i.to_str()), CountIsNextParam => debug!("prec: count is next param"), CountImplied => debug!("prec: count is implied") } diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 494ef3a81a0..360cdebc670 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -183,7 +183,7 @@ fn read_line_comments(rdr: @mut StringReader, code_to_the_left: bool, let mut lines: ~[~str] = ~[]; while rdr.curr == '/' && nextch(rdr) == '/' { let line = read_one_line_comment(rdr); - log(debug, line); + debug!("%s", line); if is_doc_comment(line) { // doc-comments are not put in comments break; } @@ -221,7 +221,7 @@ fn trim_whitespace_prefix_and_push_line(lines: &mut ~[~str], s1 = str::slice(s, col, len); } else { s1 = ~""; } } else { s1 = /*bad*/ copy s; } - log(debug, ~"pushing line: " + s1); + debug!("pushing line: %s", s1); lines.push(s1); } diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index 8557ef22fc6..7f46e452299 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -472,7 +472,7 @@ pub impl Printer { fn print(&mut self, x: token, L: int) { debug!("print %s %d (remaining line space=%d)", tok_str(x), L, self.space); - log(debug, buf_str(copy self.token, + debug!("%s", buf_str(copy self.token, copy self.size, self.left, self.right, |
