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.
This commit is contained in:
Brian Anderson 2012-01-13 19:04:36 -08:00
parent e4849d5e5d
commit 824beb4c3b

View file

@ -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);