about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-01-13 19:04:36 -0800
committerBrian Anderson <banderson@mozilla.com>2012-01-14 15:14:43 -0800
commit824beb4c3b5c1bcd12ce7aaa21b1d82dc408d475 (patch)
tree65a77b0ee54b874f8666298e02be2445b0c5eac9
parente4849d5e5dd1d016e79e7d220fdbffeb2b7f887e (diff)
downloadrust-824beb4c3b5c1bcd12ce7aaa21b1d82dc408d475.tar.gz
rust-824beb4c3b5c1bcd12ce7aaa21b1d82dc408d475.zip
rustc: Make it not an error when the source can't be loaded for highlighting
I plan to have a callback mechanism for reporting errors and it gets wierd
when reporting errors while reporting an error.
-rw-r--r--src/comp/driver/diagnostic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/driver/diagnostic.rs b/src/comp/driver/diagnostic.rs
index 58c357d724d..2ad738f8d96 100644
--- a/src/comp/driver/diagnostic.rs
+++ b/src/comp/driver/diagnostic.rs
@@ -168,8 +168,8 @@ fn highlight_lines(cm: codemap::codemap, sp: span,
     let file = alt io::read_whole_file_str(lines.name) {
       result::ok(file) { file }
       result::err(e) {
-        emit_diagnostic(none, e, fatal);
-        fail;
+        // Hard to report errors while reporting an error
+        ret;
       }
     };
     let fm = codemap::get_filemap(cm, lines.name);