@@ -345,7 +345,7 @@ fn run_compiler(
345345 Ok ( None ) => match matches. free. len( ) {
346346 0 => false , // no input: we will exit early
347347 1 => panic!( "make_input should have provided valid inputs" ) ,
348- _ => default_early_dcx. early_error ( format!(
348+ _ => default_early_dcx. early_fatal ( format!(
349349 "multiple input filenames provided (first two filenames are `{}` and `{}`)" ,
350350 matches. free[ 0 ] , matches. free[ 1 ] ,
351351 ) ) ,
@@ -376,7 +376,7 @@ fn run_compiler(
376376 }
377377
378378 if !has_input {
379- early_dcx. early_error ( "no input filename given" ) ; // this is fatal
379+ early_dcx. early_fatal ( "no input filename given" ) ; // this is fatal
380380 }
381381
382382 if !sess. opts. unstable_opts. ls. is_empty( ) {
@@ -505,9 +505,8 @@ fn make_input(
505505 if io:: stdin( ) . read_to_string( & mut src) . is_err( ) {
506506 // Immediately stop compilation if there was an issue reading
507507 // the input (for example if the input stream is not UTF-8).
508- let reported = early_dcx. early_error_no_abort(
509- "couldn't read from stdin, as it did not contain valid UTF-8" ,
510- ) ;
508+ let reported = early_dcx
509+ . early_err( "couldn't read from stdin, as it did not contain valid UTF-8" ) ;
511510 return Err ( reported) ;
512511 }
513512 if let Ok ( path) = env:: var( "UNSTABLE_RUSTDOC_TEST_PATH" ) {
@@ -567,7 +566,7 @@ fn handle_explain(early_dcx: &EarlyDiagCtxt, registry: Registry, code: &str, col
567566 }
568567 }
569568 Err ( InvalidErrorCode ) => {
570- early_dcx. early_error ( format!( "{code} is not a valid error code" ) ) ;
569+ early_dcx. early_fatal ( format!( "{code} is not a valid error code" ) ) ;
571570 }
572571 }
573572}
@@ -685,7 +684,7 @@ fn list_metadata(early_dcx: &EarlyDiagCtxt, sess: &Session, metadata_loader: &dy
685684 safe_println!( "{}" , String :: from_utf8( v) . unwrap( ) ) ;
686685 }
687686 Input :: Str { .. } => {
688- early_dcx. early_error ( "cannot list metadata for stdin" ) ;
687+ early_dcx. early_fatal ( "cannot list metadata for stdin" ) ;
689688 }
690689 }
691690}
@@ -839,7 +838,7 @@ fn print_crate_info(
839838 println_info!( "deployment_target={}" , format!( "{major}.{minor}" ) )
840839 } else {
841840 early_dcx
842- . early_error ( "only Apple targets currently support deployment version info" )
841+ . early_fatal ( "only Apple targets currently support deployment version info" )
843842 }
844843 }
845844 }
@@ -1182,7 +1181,7 @@ pub fn handle_options(early_dcx: &EarlyDiagCtxt, args: &[String]) -> Option<geto
11821181 . map( |( flag, _) | format!( "{e}. Did you mean `-{flag} {opt}`?" ) ) ,
11831182 _ => None ,
11841183 } ;
1185- early_dcx. early_error ( msg. unwrap_or_else( || e. to_string( ) ) ) ;
1184+ early_dcx. early_fatal ( msg. unwrap_or_else( || e. to_string( ) ) ) ;
11861185 } ) ;
11871186
11881187 // For all options we just parsed, we check a few aspects:
@@ -1333,7 +1332,7 @@ pub fn install_ice_hook(
13331332 {
13341333 // the error code is already going to be reported when the panic unwinds up the stack
13351334 let early_dcx = EarlyDiagCtxt :: new( ErrorOutputType :: default ( ) ) ;
1336- let _ = early_dcx. early_error_no_abort ( msg. clone( ) ) ;
1335+ let _ = early_dcx. early_err ( msg. clone( ) ) ;
13371336 return ;
13381337 }
13391338 } ;
@@ -1481,7 +1480,7 @@ pub fn init_rustc_env_logger(early_dcx: &EarlyDiagCtxt) {
14811480/// the values directly rather than having to set an environment variable.
14821481pub fn init_logger( early_dcx: & EarlyDiagCtxt , cfg: rustc_log:: LoggerConfig ) {
14831482 if let Err ( error) = rustc_log:: init_logger( cfg) {
1484- early_dcx. early_error ( error. to_string( ) ) ;
1483+ early_dcx. early_fatal ( error. to_string( ) ) ;
14851484 }
14861485}
14871486
@@ -1500,7 +1499,7 @@ pub fn main() -> ! {
15001499 . enumerate( )
15011500 . map( |( i, arg) | {
15021501 arg. into_string( ) . unwrap_or_else( |arg| {
1503- early_dcx. early_error ( format!( "argument {i} is not valid Unicode: {arg:?}" ) )
1502+ early_dcx. early_fatal ( format!( "argument {i} is not valid Unicode: {arg:?}" ) )
15041503 } )
15051504 } )
15061505 . collect:: <Vec <_>>( ) ;
0 commit comments