Do not capture stderr in the compiler. Instead just panic silently for fatal errors

This commit is contained in:
John Kåre Alsaker 2018-01-21 12:47:58 +01:00
parent 9fd7da904b
commit 9a8d6b8bb5
19 changed files with 90 additions and 97 deletions

View file

@ -212,8 +212,8 @@ fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
Err(e) => {
let msg = format!("couldn't read {:?}: {}", path.display(), e);
match spanopt {
Some(sp) => panic!(sess.span_diagnostic.span_fatal(sp, &msg)),
None => panic!(sess.span_diagnostic.fatal(&msg))
Some(sp) => sess.span_diagnostic.span_fatal(sp, &msg).raise(),
None => sess.span_diagnostic.fatal(&msg).raise()
}
}
}