@@ -291,7 +291,7 @@ impl PathSet {
291
291
const PATH_REMAP : & [ ( & str , & [ & str ] ) ] = & [
292
292
// config.toml uses `rust-analyzer-proc-macro-srv`, but the
293
293
// actual path is `proc-macro-srv-cli`
294
- ( "rust-analyzer-proc-macro-srv" , & [ "proc-macro-srv-cli" ] ) ,
294
+ ( "rust-analyzer-proc-macro-srv" , & [ "src/tools/rust-analyzer/crates/ proc-macro-srv-cli" ] ) ,
295
295
// Make `x test tests` function the same as `x t tests/*`
296
296
(
297
297
"tests" ,
@@ -382,10 +382,12 @@ impl StepDescription {
382
382
}
383
383
384
384
if !builder. config . skip . is_empty ( ) && !matches ! ( builder. config. dry_run, DryRun :: SelfCheck ) {
385
- builder. verbose ( & format ! (
386
- "{:?} not skipped for {:?} -- not in {:?}" ,
387
- pathset, self . name, builder. config. skip
388
- ) ) ;
385
+ builder. verbose ( || {
386
+ println ! (
387
+ "{:?} not skipped for {:?} -- not in {:?}" ,
388
+ pathset, self . name, builder. config. skip
389
+ )
390
+ } ) ;
389
391
}
390
392
false
391
393
}
@@ -1093,10 +1095,9 @@ impl<'a> Builder<'a> {
1093
1095
// Avoid deleting the rustlib/ directory we just copied
1094
1096
// (in `impl Step for Sysroot`).
1095
1097
if !builder. download_rustc ( ) {
1096
- builder. verbose ( & format ! (
1097
- "Removing sysroot {} to avoid caching bugs" ,
1098
- sysroot. display( )
1099
- ) ) ;
1098
+ builder. verbose ( || {
1099
+ println ! ( "Removing sysroot {} to avoid caching bugs" , sysroot. display( ) )
1100
+ } ) ;
1100
1101
let _ = fs:: remove_dir_all ( & sysroot) ;
1101
1102
t ! ( fs:: create_dir_all( & sysroot) ) ;
1102
1103
}
@@ -1436,7 +1437,7 @@ impl<'a> Builder<'a> {
1436
1437
1437
1438
let sysroot_str = sysroot. as_os_str ( ) . to_str ( ) . expect ( "sysroot should be UTF-8" ) ;
1438
1439
if !matches ! ( self . config. dry_run, DryRun :: SelfCheck ) {
1439
- self . verbose_than ( 0 , & format ! ( "using sysroot {sysroot_str}" ) ) ;
1440
+ self . verbose_than ( 0 , || println ! ( "using sysroot {sysroot_str}" ) ) ;
1440
1441
}
1441
1442
1442
1443
let mut rustflags = Rustflags :: new ( target) ;
@@ -1731,15 +1732,16 @@ impl<'a> Builder<'a> {
1731
1732
} ,
1732
1733
) ;
1733
1734
1735
+ let split_debuginfo = self . config . split_debuginfo ( target) ;
1734
1736
let split_debuginfo_is_stable = target. contains ( "linux" )
1735
1737
|| target. contains ( "apple" )
1736
- || ( target. is_msvc ( ) && self . config . rust_split_debuginfo == SplitDebuginfo :: Packed )
1737
- || ( target. is_windows ( ) && self . config . rust_split_debuginfo == SplitDebuginfo :: Off ) ;
1738
+ || ( target. is_msvc ( ) && split_debuginfo == SplitDebuginfo :: Packed )
1739
+ || ( target. is_windows ( ) && split_debuginfo == SplitDebuginfo :: Off ) ;
1738
1740
1739
1741
if !split_debuginfo_is_stable {
1740
1742
rustflags. arg ( "-Zunstable-options" ) ;
1741
1743
}
1742
- match self . config . rust_split_debuginfo {
1744
+ match split_debuginfo {
1743
1745
SplitDebuginfo :: Packed => rustflags. arg ( "-Csplit-debuginfo=packed" ) ,
1744
1746
SplitDebuginfo :: Unpacked => rustflags. arg ( "-Csplit-debuginfo=unpacked" ) ,
1745
1747
SplitDebuginfo :: Off => rustflags. arg ( "-Csplit-debuginfo=off" ) ,
@@ -2102,11 +2104,11 @@ impl<'a> Builder<'a> {
2102
2104
panic ! ( "{}" , out) ;
2103
2105
}
2104
2106
if let Some ( out) = self . cache . get ( & step) {
2105
- self . verbose_than ( 1 , & format ! ( "{}c {:?}" , " " . repeat( stack. len( ) ) , step) ) ;
2107
+ self . verbose_than ( 1 , || println ! ( "{}c {:?}" , " " . repeat( stack. len( ) ) , step) ) ;
2106
2108
2107
2109
return out;
2108
2110
}
2109
- self . verbose_than ( 1 , & format ! ( "{}> {:?}" , " " . repeat( stack. len( ) ) , step) ) ;
2111
+ self . verbose_than ( 1 , || println ! ( "{}> {:?}" , " " . repeat( stack. len( ) ) , step) ) ;
2110
2112
stack. push ( Box :: new ( step. clone ( ) ) ) ;
2111
2113
}
2112
2114
@@ -2144,7 +2146,7 @@ impl<'a> Builder<'a> {
2144
2146
let cur_step = stack. pop ( ) . expect ( "step stack empty" ) ;
2145
2147
assert_eq ! ( cur_step. downcast_ref( ) , Some ( & step) ) ;
2146
2148
}
2147
- self . verbose_than ( 1 , & format ! ( "{}< {:?}" , " " . repeat( self . stack. borrow( ) . len( ) ) , step) ) ;
2149
+ self . verbose_than ( 1 , || println ! ( "{}< {:?}" , " " . repeat( self . stack. borrow( ) . len( ) ) , step) ) ;
2148
2150
self . cache . put ( step, out. clone ( ) ) ;
2149
2151
out
2150
2152
}
0 commit comments