@@ -36,8 +36,9 @@ fn main() {
3636 let args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
3737 // Detect whether or not we're a build script depending on whether --target
3838 // is passed (a bit janky...)
39- let target = args. windows ( 2 ) . find ( |w| & * w[ 0 ] == "--target" )
40- . and_then ( |w| w[ 1 ] . to_str ( ) ) ;
39+ let target = args. windows ( 2 )
40+ . find ( |w| & * w[ 0 ] == "--target" )
41+ . and_then ( |w| w[ 1 ] . to_str ( ) ) ;
4142 let version = args. iter ( ) . find ( |w| & * * w == "-vV" ) ;
4243
4344 // Build scripts always use the snapshot compiler which is guaranteed to be
@@ -64,9 +65,10 @@ fn main() {
6465
6566 let mut cmd = Command :: new ( rustc) ;
6667 cmd. args ( & args)
67- . arg ( "--cfg" ) . arg ( format ! ( "stage{}" , stage) )
68- . env ( bootstrap:: util:: dylib_path_var ( ) ,
69- env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
68+ . arg ( "--cfg" )
69+ . arg ( format ! ( "stage{}" , stage) )
70+ . env ( bootstrap:: util:: dylib_path_var ( ) ,
71+ env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
7072
7173 if let Some ( target) = target {
7274 // The stage0 compiler has a special sysroot distinct from what we
@@ -101,9 +103,8 @@ fn main() {
101103 // This... is a bit of a hack how we detect this. Ideally this
102104 // information should be encoded in the crate I guess? Would likely
103105 // require an RFC amendment to RFC 1513, however.
104- let is_panic_abort = args. windows ( 2 ) . any ( |a| {
105- & * a[ 0 ] == "--crate-name" && & * a[ 1 ] == "panic_abort"
106- } ) ;
106+ let is_panic_abort = args. windows ( 2 )
107+ . any ( |a| & * a[ 0 ] == "--crate-name" && & * a[ 1 ] == "panic_abort" ) ;
107108 if is_panic_abort {
108109 cmd. arg ( "-C" ) . arg ( "panic=abort" ) ;
109110 }
@@ -116,7 +117,7 @@ fn main() {
116117 cmd. arg ( "-Cdebuginfo=1" ) ;
117118 }
118119 let debug_assertions = match env:: var ( "RUSTC_DEBUG_ASSERTIONS" ) {
119- Ok ( s) => if s == "true" { "y" } else { "n" } ,
120+ Ok ( s) => if s == "true" { "y" } else { "n" } ,
120121 Err ( ..) => "n" ,
121122 } ;
122123 cmd. arg ( "-C" ) . arg ( format ! ( "debug-assertions={}" , debug_assertions) ) ;
0 commit comments