Remove all threading through of ErrorGuaranteed from the driver
It was inconsistently done (sometimes even within a single function) and most of the rest of the compiler uses fatal errors instead, which need to be caught using catch_with_exit_code anyway. Using fatal errors instead of ErrorGuaranteed everywhere in the driver simplifies things a bit.
This commit is contained in:
parent
030545d8c3
commit
401dd840ff
19 changed files with 175 additions and 216 deletions
|
@ -51,6 +51,7 @@ pub mod source_map;
|
|||
use source_map::{SourceMap, SourceMapInputs};
|
||||
|
||||
pub use self::caching_source_map_view::CachingSourceMapView;
|
||||
use crate::fatal_error::FatalError;
|
||||
|
||||
pub mod edition;
|
||||
use edition::Edition;
|
||||
|
@ -2614,6 +2615,10 @@ impl ErrorGuaranteed {
|
|||
pub fn unchecked_error_guaranteed() -> Self {
|
||||
ErrorGuaranteed(())
|
||||
}
|
||||
|
||||
pub fn raise_fatal(self) -> ! {
|
||||
FatalError.raise()
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: rustc_serialize::Encoder> Encodable<E> for ErrorGuaranteed {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue