diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-23 12:34:26 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-03-02 09:45:25 -0600 |
| commit | e489a94deef3d41513fe4254804d730f0fd6cbc0 (patch) | |
| tree | d2c3743151e614831817cb8c27487a820826cc29 /compiler/rustc_driver/src | |
| parent | c42d846add941a26bd254911e16f02c4a3f9346f (diff) | |
| download | rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.tar.gz rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.zip | |
rename ErrorReported -> ErrorGuaranteed
Diffstat (limited to 'compiler/rustc_driver/src')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_driver/src/pretty.rs | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index db03ee8c4bc..b36ce63dda7 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -21,7 +21,7 @@ use rustc_codegen_ssa::{traits::CodegenBackend, CodegenResults}; use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry}; use rustc_data_structures::sync::SeqCst; use rustc_errors::registry::{InvalidErrorCode, Registry}; -use rustc_errors::{ErrorReported, PResult}; +use rustc_errors::{ErrorGuaranteed, PResult}; use rustc_feature::find_gated_cfg; use rustc_interface::util::{self, collect_crate_types, get_codegen_backend}; use rustc_interface::{interface, Queries}; @@ -73,7 +73,7 @@ const ICE_REPORT_COMPILER_FLAGS_EXCLUDE: &[&str] = &["metadata", "extra-filename const ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE: &[&str] = &["incremental"]; -pub fn abort_on_err<T>(result: Result<T, ErrorReported>, sess: &Session) -> T { +pub fn abort_on_err<T>(result: Result<T, ErrorGuaranteed>, sess: &Session) -> T { match result { Err(..) => { sess.abort_if_errors(); @@ -235,7 +235,7 @@ fn run_compiler( }; match make_input(config.opts.error_format, &matches.free) { - Err(ErrorReported) => return Err(ErrorReported), + Err(ErrorGuaranteed) => return Err(ErrorGuaranteed), Ok(Some((input, input_file_path))) => { config.input = input; config.input_path = input_file_path; @@ -457,7 +457,7 @@ fn make_output(matches: &getopts::Matches) -> (Option<PathBuf>, Option<PathBuf>) fn make_input( error_format: ErrorOutputType, free_matches: &[String], -) -> Result<Option<(Input, Option<PathBuf>)>, ErrorReported> { +) -> Result<Option<(Input, Option<PathBuf>)>, ErrorGuaranteed> { if free_matches.len() == 1 { let ifile = &free_matches[0]; if ifile == "-" { @@ -469,7 +469,7 @@ fn make_input( error_format, "couldn't read from stdin, as it did not contain valid UTF-8", ); - return Err(ErrorReported); + return Err(ErrorGuaranteed); } if let Ok(path) = env::var("UNSTABLE_RUSTDOC_TEST_PATH") { let line = env::var("UNSTABLE_RUSTDOC_TEST_LINE").expect( @@ -1125,10 +1125,10 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> { /// The compiler currently unwinds with a special sentinel value to abort /// compilation on fatal errors. This function catches that sentinel and turns /// the panic into a `Result` instead. -pub fn catch_fatal_errors<F: FnOnce() -> R, R>(f: F) -> Result<R, ErrorReported> { +pub fn catch_fatal_errors<F: FnOnce() -> R, R>(f: F) -> Result<R, ErrorGuaranteed> { catch_unwind(panic::AssertUnwindSafe(f)).map_err(|value| { if value.is::<rustc_errors::FatalErrorMarker>() { - ErrorReported + ErrorGuaranteed } else { panic::resume_unwind(value); } diff --git a/compiler/rustc_driver/src/pretty.rs b/compiler/rustc_driver/src/pretty.rs index 2e9050dd672..0c0c6130965 100644 --- a/compiler/rustc_driver/src/pretty.rs +++ b/compiler/rustc_driver/src/pretty.rs @@ -2,7 +2,7 @@ use rustc_ast as ast; use rustc_ast_pretty::pprust; -use rustc_errors::ErrorReported; +use rustc_errors::ErrorGuaranteed; use rustc_hir as hir; use rustc_hir_pretty as pprust_hir; use rustc_middle::hir::map as hir_map; @@ -479,7 +479,7 @@ fn print_with_analysis( tcx: TyCtxt<'_>, ppm: PpMode, ofile: Option<&Path>, -) -> Result<(), ErrorReported> { +) -> Result<(), ErrorGuaranteed> { tcx.analysis(())?; let out = match ppm { Mir => { |
