Skip to content

Commit 824beb4

Browse files
committed
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.
1 parent e4849d5 commit 824beb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/comp/driver/diagnostic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ fn highlight_lines(cm: codemap::codemap, sp: span,
168168
let file = alt io::read_whole_file_str(lines.name) {
169169
result::ok(file) { file }
170170
result::err(e) {
171-
emit_diagnostic(none, e, fatal);
172-
fail;
171+
// Hard to report errors while reporting an error
172+
ret;
173173
}
174174
};
175175
let fm = codemap::get_filemap(cm, lines.name);

0 commit comments

Comments
 (0)