@@ -188,14 +188,16 @@ pub fn run<F>(run_compiler: F) -> isize
188188 }
189189 None => {
190190 let emitter =
191- errors:: emitter:: EmitterWriter :: stderr ( errors:: ColorConfig :: Auto ,
192- None ,
193- true ,
194- false ) ;
191+ errors:: emitter:: EmitterWriter :: stderr (
192+ errors:: ColorConfig :: Auto ,
193+ None ,
194+ true ,
195+ false
196+ ) ;
195197 let handler = errors:: Handler :: with_emitter ( true , false , Box :: new ( emitter) ) ;
196198 handler. emit ( & MultiSpan :: new ( ) ,
197- "aborting due to previous error(s)" ,
198- errors:: Level :: Fatal ) ;
199+ "aborting due to previous error(s)" ,
200+ errors:: Level :: Fatal ) ;
199201 panic:: resume_unwind ( Box :: new ( errors:: FatalErrorMarker ) ) ;
200202 }
201203 }
@@ -316,9 +318,8 @@ fn get_codegen_sysroot(backend_name: &str) -> fn() -> Box<dyn CodegenBackend> {
316318 let sysroot = sysroot_candidates. iter ( )
317319 . map ( |sysroot| {
318320 let libdir = filesearch:: relative_target_lib_path ( & sysroot, & target) ;
319- sysroot. join ( libdir)
320- . with_file_name ( option_env ! ( "CFG_CODEGEN_BACKENDS_DIR" )
321- . unwrap_or ( "codegen-backends" ) )
321+ sysroot. join ( libdir) . with_file_name (
322+ option_env ! ( "CFG_CODEGEN_BACKENDS_DIR" ) . unwrap_or ( "codegen-backends" ) )
322323 } )
323324 . filter ( |f| {
324325 info ! ( "codegen backend candidate: {}" , f. display( ) ) ;
@@ -360,8 +361,8 @@ fn get_codegen_sysroot(backend_name: &str) -> fn() -> Box<dyn CodegenBackend> {
360361 }
361362 if let Some ( ref prev) = file {
362363 let err = format ! ( "duplicate codegen backends found\n \
363- first: {}\n \
364- second: {}\n \
364+ first: {}\n \
365+ second: {}\n \
365366 ", prev. display( ) , path. display( ) ) ;
366367 early_error ( ErrorOutputType :: default ( ) , & err) ;
367368 }
@@ -373,7 +374,7 @@ fn get_codegen_sysroot(backend_name: &str) -> fn() -> Box<dyn CodegenBackend> {
373374 None => {
374375 let err = format ! ( "failed to load default codegen backend for `{}`, \
375376 no appropriate codegen dylib found in `{}`",
376- backend_name, sysroot. display( ) ) ;
377+ backend_name, sysroot. display( ) ) ;
377378 early_error ( ErrorOutputType :: default ( ) , & err) ;
378379 }
379380 }
@@ -1010,7 +1011,7 @@ impl RustcDefaultCalls {
10101011 use rustc:: session:: config:: PrintRequest :: * ;
10111012 // PrintRequest::NativeStaticLibs is special - printed during linking
10121013 // (empty iterator returns true)
1013- if sess. opts . prints . iter ( ) . all ( |& p| p== PrintRequest :: NativeStaticLibs ) {
1014+ if sess. opts . prints . iter ( ) . all ( |& p| p == PrintRequest :: NativeStaticLibs ) {
10141015 return Compilation :: Continue ;
10151016 }
10161017
@@ -1054,10 +1055,7 @@ impl RustcDefaultCalls {
10541055 & id,
10551056 & t_outputs
10561057 ) ;
1057- println ! ( "{}" ,
1058- fname. file_name( )
1059- . unwrap( )
1060- . to_string_lossy( ) ) ;
1058+ println ! ( "{}" , fname. file_name( ) . unwrap( ) . to_string_lossy( ) ) ;
10611059 }
10621060 }
10631061 Cfg => {
@@ -1129,9 +1127,8 @@ fn commit_date_str() -> Option<&'static str> {
11291127pub fn version ( binary : & str , matches : & getopts:: Matches ) {
11301128 let verbose = matches. opt_present ( "verbose" ) ;
11311129
1132- println ! ( "{} {}" ,
1133- binary,
1134- option_env!( "CFG_VERSION" ) . unwrap_or( "unknown version" ) ) ;
1130+ println ! ( "{} {}" , binary, option_env!( "CFG_VERSION" ) . unwrap_or( "unknown version" ) ) ;
1131+
11351132 if verbose {
11361133 fn unw ( x : Option < & str > ) -> & str {
11371134 x. unwrap_or ( "unknown" )
@@ -1252,8 +1249,6 @@ Available lint options:
12521249
12531250 print_lints ( builtin) ;
12541251
1255-
1256-
12571252 let max_name_len = max ( "warnings" . len ( ) ,
12581253 plugin_groups. iter ( )
12591254 . chain ( & builtin_groups)
@@ -1429,6 +1424,7 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
14291424 }
14301425
14311426 let cg_flags = matches. opt_strs ( "C" ) ;
1427+
14321428 if cg_flags. iter ( ) . any ( |x| * x == "help" ) {
14331429 describe_codegen_flags ( ) ;
14341430 return None ;
@@ -1477,7 +1473,7 @@ pub fn in_named_rustc_thread<F, R>(name: String, f: F) -> Result<R, Box<dyn Any
14771473 // Temporarily have stack size set to 16MB to deal with nom-using crates failing
14781474 const STACK_SIZE : usize = 16 * 1024 * 1024 ; // 16MB
14791475
1480- #[ cfg( all( unix, not( target_os = "haiku" ) ) ) ]
1476+ #[ cfg( all( unix, not( target_os = "haiku" ) ) ) ]
14811477 let spawn_thread = unsafe {
14821478 // Fetch the current resource limits
14831479 let mut rlim = libc:: rlimit {
@@ -1531,7 +1527,7 @@ pub fn in_named_rustc_thread<F, R>(name: String, f: F) -> Result<R, Box<dyn Any
15311527 }
15321528 } ;
15331529
1534- #[ cfg( not( any( windows, unix) ) ) ]
1530+ #[ cfg( not( any( windows, unix) ) ) ]
15351531 let spawn_thread = true ;
15361532
15371533 // The or condition is added from backward compatibility.
0 commit comments