diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-27 15:40:47 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-27 15:45:11 -0700 |
| commit | 805e3098c5ffaa62432201076cec8b008b78920d (patch) | |
| tree | 404526c51854e02940e7d4c8f2f3b20487030231 /src/comp/syntax | |
| parent | 609e38d8e7313e3e267e6481212420b05c38ff8f (diff) | |
| download | rust-805e3098c5ffaa62432201076cec8b008b78920d.tar.gz rust-805e3098c5ffaa62432201076cec8b008b78920d.zip | |
Don't output bogus spans when reporting a message without one.
Emacs gets confused by <input>:0:0:0:0:
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/codemap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs index 3b329986c48..e522becd3e0 100644 --- a/src/comp/syntax/codemap.rs +++ b/src/comp/syntax/codemap.rs @@ -99,16 +99,16 @@ fn span_to_str(sp: &span, cm: &codemap) -> str { fn emit_diagnostic(sp: &option::t<span>, msg: &str, kind: &str, color: u8, cm: &codemap) { - let ss = "<input>:0:0:0:0"; + let ss = ""; let maybe_lines: option::t<@file_lines> = none; alt sp { some(ssp) { - ss = span_to_str(ssp, cm); + ss = span_to_str(ssp, cm) + " "; maybe_lines = some(span_to_lines(ssp, cm)); } none. { } } - io::stdout().write_str(ss + " "); + io::stdout().write_str(ss); if term::color_supported() { term::fg(io::stdout().get_buf_writer(), color); } |
