@@ -319,7 +319,7 @@ impl StepDescription {
319
319
fn is_excluded ( & self , builder : & Builder < ' _ > , pathset : & PathSet ) -> bool {
320
320
if builder. config . exclude . iter ( ) . any ( |e| pathset. has ( & e, builder. kind ) ) {
321
321
if !matches ! ( builder. config. dry_run, DryRun :: SelfCheck ) {
322
- println ! ( "Skipping {:?} because it is excluded" , pathset ) ;
322
+ println ! ( "Skipping {pathset :?} because it is excluded" ) ;
323
323
}
324
324
return true ;
325
325
}
@@ -473,8 +473,7 @@ impl<'a> ShouldRun<'a> {
473
473
// `compiler` and `library` folders respectively.
474
474
assert ! (
475
475
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}"
478
477
) ;
479
478
self . paths . insert ( PathSet :: Set (
480
479
std:: iter:: once ( TaskPath { path : alias. into ( ) , kind : Some ( self . kind ) } ) . collect ( ) ,
@@ -1283,7 +1282,7 @@ impl<'a> Builder<'a> {
1283
1282
out_dir. join ( target. triple ) . join ( "doc" )
1284
1283
}
1285
1284
}
1286
- _ => panic ! ( "doc mode {:?} not expected" , mode ) ,
1285
+ _ => panic ! ( "doc mode {mode :?} not expected" ) ,
1287
1286
} ;
1288
1287
let rustdoc = self . rustdoc ( compiler) ;
1289
1288
self . clear_if_dirty ( & my_out, & rustdoc) ;
@@ -1637,15 +1636,15 @@ impl<'a> Builder<'a> {
1637
1636
// so. Note that this is definitely a hack, and we should likely
1638
1637
// flesh out rpath support more fully in the future.
1639
1638
rustflags. arg ( "-Zosx-rpath-install-name" ) ;
1640
- Some ( format ! ( "-Wl,-rpath,@loader_path/../{}" , libdir ) )
1639
+ Some ( format ! ( "-Wl,-rpath,@loader_path/../{libdir}" ) )
1641
1640
} else if !target. contains ( "windows" ) && !target. contains ( "aix" ) {
1642
1641
rustflags. arg ( "-Clink-args=-Wl,-z,origin" ) ;
1643
- Some ( format ! ( "-Wl,-rpath,$ORIGIN/../{}" , libdir ) )
1642
+ Some ( format ! ( "-Wl,-rpath,$ORIGIN/../{libdir}" ) )
1644
1643
} else {
1645
1644
None
1646
1645
} ;
1647
1646
if let Some ( rpath) = rpath {
1648
- rustflags. arg ( & format ! ( "-Clink-args={}" , rpath ) ) ;
1647
+ rustflags. arg ( & format ! ( "-Clink-args={rpath}" ) ) ;
1649
1648
}
1650
1649
}
1651
1650
@@ -1659,7 +1658,7 @@ impl<'a> Builder<'a> {
1659
1658
1660
1659
if let Some ( target_linker) = self . linker ( target) {
1661
1660
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) ;
1663
1662
}
1664
1663
if self . is_fuse_ld_lld ( target) {
1665
1664
rustflags. arg ( "-Clink-args=-fuse-ld=lld" ) ;
@@ -1895,24 +1894,24 @@ impl<'a> Builder<'a> {
1895
1894
} ;
1896
1895
let triple_underscored = target. triple . replace ( "-" , "_" ) ;
1897
1896
let cc = ccacheify ( & self . cc ( target) ) ;
1898
- cargo. env ( format ! ( "CC_{}" , triple_underscored ) , & cc) ;
1897
+ cargo. env ( format ! ( "CC_{triple_underscored}" ) , & cc) ;
1899
1898
1900
1899
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) ;
1902
1901
1903
1902
if let Some ( ar) = self . ar ( target) {
1904
1903
let ranlib = format ! ( "{} s" , ar. display( ) ) ;
1905
1904
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) ;
1908
1907
}
1909
1908
1910
1909
if let Ok ( cxx) = self . cxx ( target) {
1911
1910
let cxx = ccacheify ( & cxx) ;
1912
1911
let cxxflags = self . cflags ( target, GitRepo :: Rustc , CLang :: Cxx ) . join ( " " ) ;
1913
1912
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) ;
1916
1915
}
1917
1916
}
1918
1917
@@ -2025,15 +2024,15 @@ impl<'a> Builder<'a> {
2025
2024
if let Some ( limit) = limit {
2026
2025
if stage == 0 || self . config . default_codegen_backend ( ) . unwrap_or_default ( ) == "llvm"
2027
2026
{
2028
- rustflags. arg ( & format ! ( "-Cllvm-args=-import-instr-limit={}" , limit ) ) ;
2027
+ rustflags. arg ( & format ! ( "-Cllvm-args=-import-instr-limit={limit}" ) ) ;
2029
2028
}
2030
2029
}
2031
2030
}
2032
2031
2033
2032
if matches ! ( mode, Mode :: Std ) {
2034
2033
if let Some ( mir_opt_level) = self . config . rust_validate_mir_opts {
2035
2034
rustflags. arg ( "-Zvalidate-mir" ) ;
2036
- rustflags. arg ( & format ! ( "-Zmir-opt-level={}" , mir_opt_level ) ) ;
2035
+ rustflags. arg ( & format ! ( "-Zmir-opt-level={mir_opt_level}" ) ) ;
2037
2036
}
2038
2037
// Always enable inlining MIR when building the standard library.
2039
2038
// Without this flag, MIR inlining is disabled when incremental compilation is enabled.
@@ -2065,9 +2064,9 @@ impl<'a> Builder<'a> {
2065
2064
continue ;
2066
2065
}
2067
2066
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 " ) ;
2069
2068
for el in stack. iter ( ) . rev ( ) {
2070
- out += & format ! ( "\t {:?}\n " , el ) ;
2069
+ out += & format ! ( "\t {el :?}\n " ) ;
2071
2070
}
2072
2071
panic ! ( "{}" , out) ;
2073
2072
}
@@ -2094,7 +2093,7 @@ impl<'a> Builder<'a> {
2094
2093
} ;
2095
2094
2096
2095
if self . config . print_step_timings && !self . config . dry_run ( ) {
2097
- let step_string = format ! ( "{:?}" , step ) ;
2096
+ let step_string = format ! ( "{step :?}" ) ;
2098
2097
let brace_index = step_string. find ( "{" ) . unwrap_or ( 0 ) ;
2099
2098
let type_string = type_name :: < S > ( ) ;
2100
2099
println ! (
@@ -2174,7 +2173,7 @@ impl<'a> Builder<'a> {
2174
2173
let path = path. as_ref ( ) ;
2175
2174
self . info ( & format ! ( "Opening doc {}" , path. display( ) ) ) ;
2176
2175
if let Err ( err) = opener:: open ( path) {
2177
- self . info ( & format ! ( "{}\n " , err ) ) ;
2176
+ self . info ( & format ! ( "{err }\n " ) ) ;
2178
2177
}
2179
2178
}
2180
2179
}
0 commit comments