@@ -319,7 +319,7 @@ impl StepDescription {
319319 fn is_excluded ( & self , builder : & Builder < ' _ > , pathset : & PathSet ) -> bool {
320320 if builder. config . exclude . iter ( ) . any ( |e| pathset. has ( & e, builder. kind ) ) {
321321 if !matches ! ( builder. config. dry_run, DryRun :: SelfCheck ) {
322- println ! ( "Skipping {:?} because it is excluded" , pathset ) ;
322+ println ! ( "Skipping {pathset :?} because it is excluded" ) ;
323323 }
324324 return true ;
325325 }
@@ -473,8 +473,7 @@ impl<'a> ShouldRun<'a> {
473473 // `compiler` and `library` folders respectively.
474474 assert ! (
475475 self . kind == Kind :: Setup || !self . builder. src. join( alias) . exists( ) ,
476- "use `builder.path()` for real paths: {}" ,
477- alias
476+ "use `builder.path()` for real paths: {alias}"
478477 ) ;
479478 self . paths . insert ( PathSet :: Set (
480479 std:: iter:: once ( TaskPath { path : alias. into ( ) , kind : Some ( self . kind ) } ) . collect ( ) ,
@@ -1283,7 +1282,7 @@ impl<'a> Builder<'a> {
12831282 out_dir. join ( target. triple ) . join ( "doc" )
12841283 }
12851284 }
1286- _ => panic ! ( "doc mode {:?} not expected" , mode ) ,
1285+ _ => panic ! ( "doc mode {mode :?} not expected" ) ,
12871286 } ;
12881287 let rustdoc = self . rustdoc ( compiler) ;
12891288 self . clear_if_dirty ( & my_out, & rustdoc) ;
@@ -1637,15 +1636,15 @@ impl<'a> Builder<'a> {
16371636 // so. Note that this is definitely a hack, and we should likely
16381637 // flesh out rpath support more fully in the future.
16391638 rustflags. arg ( "-Zosx-rpath-install-name" ) ;
1640- Some ( format ! ( "-Wl,-rpath,@loader_path/../{}" , libdir ) )
1639+ Some ( format ! ( "-Wl,-rpath,@loader_path/../{libdir}" ) )
16411640 } else if !target. contains ( "windows" ) && !target. contains ( "aix" ) {
16421641 rustflags. arg ( "-Clink-args=-Wl,-z,origin" ) ;
1643- Some ( format ! ( "-Wl,-rpath,$ORIGIN/../{}" , libdir ) )
1642+ Some ( format ! ( "-Wl,-rpath,$ORIGIN/../{libdir}" ) )
16441643 } else {
16451644 None
16461645 } ;
16471646 if let Some ( rpath) = rpath {
1648- rustflags. arg ( & format ! ( "-Clink-args={}" , rpath ) ) ;
1647+ rustflags. arg ( & format ! ( "-Clink-args={rpath}" ) ) ;
16491648 }
16501649 }
16511650
@@ -1659,7 +1658,7 @@ impl<'a> Builder<'a> {
16591658
16601659 if let Some ( target_linker) = self . linker ( target) {
16611660 let target = crate :: envify ( & target. triple ) ;
1662- cargo. env ( & format ! ( "CARGO_TARGET_{}_LINKER" , target ) , target_linker) ;
1661+ cargo. env ( & format ! ( "CARGO_TARGET_{target }_LINKER" ) , target_linker) ;
16631662 }
16641663 if self . is_fuse_ld_lld ( target) {
16651664 rustflags. arg ( "-Clink-args=-fuse-ld=lld" ) ;
@@ -1895,24 +1894,24 @@ impl<'a> Builder<'a> {
18951894 } ;
18961895 let triple_underscored = target. triple . replace ( "-" , "_" ) ;
18971896 let cc = ccacheify ( & self . cc ( target) ) ;
1898- cargo. env ( format ! ( "CC_{}" , triple_underscored ) , & cc) ;
1897+ cargo. env ( format ! ( "CC_{triple_underscored}" ) , & cc) ;
18991898
19001899 let cflags = self . cflags ( target, GitRepo :: Rustc , CLang :: C ) . join ( " " ) ;
1901- cargo. env ( format ! ( "CFLAGS_{}" , triple_underscored ) , & cflags) ;
1900+ cargo. env ( format ! ( "CFLAGS_{triple_underscored}" ) , & cflags) ;
19021901
19031902 if let Some ( ar) = self . ar ( target) {
19041903 let ranlib = format ! ( "{} s" , ar. display( ) ) ;
19051904 cargo
1906- . env ( format ! ( "AR_{}" , triple_underscored ) , ar)
1907- . env ( format ! ( "RANLIB_{}" , triple_underscored ) , ranlib) ;
1905+ . env ( format ! ( "AR_{triple_underscored}" ) , ar)
1906+ . env ( format ! ( "RANLIB_{triple_underscored}" ) , ranlib) ;
19081907 }
19091908
19101909 if let Ok ( cxx) = self . cxx ( target) {
19111910 let cxx = ccacheify ( & cxx) ;
19121911 let cxxflags = self . cflags ( target, GitRepo :: Rustc , CLang :: Cxx ) . join ( " " ) ;
19131912 cargo
1914- . env ( format ! ( "CXX_{}" , triple_underscored ) , & cxx)
1915- . env ( format ! ( "CXXFLAGS_{}" , triple_underscored ) , cxxflags) ;
1913+ . env ( format ! ( "CXX_{triple_underscored}" ) , & cxx)
1914+ . env ( format ! ( "CXXFLAGS_{triple_underscored}" ) , cxxflags) ;
19161915 }
19171916 }
19181917
@@ -2025,15 +2024,15 @@ impl<'a> Builder<'a> {
20252024 if let Some ( limit) = limit {
20262025 if stage == 0 || self . config . default_codegen_backend ( ) . unwrap_or_default ( ) == "llvm"
20272026 {
2028- rustflags. arg ( & format ! ( "-Cllvm-args=-import-instr-limit={}" , limit ) ) ;
2027+ rustflags. arg ( & format ! ( "-Cllvm-args=-import-instr-limit={limit}" ) ) ;
20292028 }
20302029 }
20312030 }
20322031
20332032 if matches ! ( mode, Mode :: Std ) {
20342033 if let Some ( mir_opt_level) = self . config . rust_validate_mir_opts {
20352034 rustflags. arg ( "-Zvalidate-mir" ) ;
2036- rustflags. arg ( & format ! ( "-Zmir-opt-level={}" , mir_opt_level ) ) ;
2035+ rustflags. arg ( & format ! ( "-Zmir-opt-level={mir_opt_level}" ) ) ;
20372036 }
20382037 // Always enable inlining MIR when building the standard library.
20392038 // Without this flag, MIR inlining is disabled when incremental compilation is enabled.
@@ -2065,9 +2064,9 @@ impl<'a> Builder<'a> {
20652064 continue ;
20662065 }
20672066 let mut out = String :: new ( ) ;
2068- out += & format ! ( "\n \n Cycle in build detected when adding {:?}\n " , step ) ;
2067+ out += & format ! ( "\n \n Cycle in build detected when adding {step :?}\n " ) ;
20692068 for el in stack. iter ( ) . rev ( ) {
2070- out += & format ! ( "\t {:?}\n " , el ) ;
2069+ out += & format ! ( "\t {el :?}\n " ) ;
20712070 }
20722071 panic ! ( "{}" , out) ;
20732072 }
@@ -2094,7 +2093,7 @@ impl<'a> Builder<'a> {
20942093 } ;
20952094
20962095 if self . config . print_step_timings && !self . config . dry_run ( ) {
2097- let step_string = format ! ( "{:?}" , step ) ;
2096+ let step_string = format ! ( "{step :?}" ) ;
20982097 let brace_index = step_string. find ( "{" ) . unwrap_or ( 0 ) ;
20992098 let type_string = type_name :: < S > ( ) ;
21002099 println ! (
@@ -2174,7 +2173,7 @@ impl<'a> Builder<'a> {
21742173 let path = path. as_ref ( ) ;
21752174 self . info ( & format ! ( "Opening doc {}" , path. display( ) ) ) ;
21762175 if let Err ( err) = opener:: open ( path) {
2177- self . info ( & format ! ( "{}\n " , err ) ) ;
2176+ self . info ( & format ! ( "{err }\n " ) ) ;
21782177 }
21792178 }
21802179}
0 commit comments