From 824beb4c3b5c1bcd12ce7aaa21b1d82dc408d475 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 13 Jan 2012 19:04:36 -0800 Subject: [PATCH] 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. --- src/comp/driver/diagnostic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comp/driver/diagnostic.rs b/src/comp/driver/diagnostic.rs index 58c357d724d2..2ad738f8d960 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);