From 609e38d8e7313e3e267e6481212420b05c38ff8f Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 27 Aug 2011 15:39:53 -0700 Subject: [PATCH] Output error spans that don't confuse emacs compilation mode. Closes #845 --- src/comp/syntax/codemap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs index a52a58e629e0..3b329986c488 100644 --- a/src/comp/syntax/codemap.rs +++ b/src/comp/syntax/codemap.rs @@ -80,7 +80,7 @@ fn span_to_str(sp: &span, cm: &codemap) -> str { let lo = lookup_char_pos(cm, cur.lo); let hi = lookup_char_pos(cm, cur.hi); res += - #fmt["%s:%u:%u:%u:%u", + #fmt["%s:%u:%u: %u:%u", if some(lo.filename) == prev_file { "-" } else { lo.filename }, lo.line, lo.col, hi.line, hi.col]; @@ -108,7 +108,7 @@ fn emit_diagnostic(sp: &option::t, msg: &str, kind: &str, color: u8, } none. { } } - io::stdout().write_str(ss + ": "); + io::stdout().write_str(ss + " "); if term::color_supported() { term::fg(io::stdout().get_buf_writer(), color); }