Skip to content

Commit 80c0682

Browse files
committed
Auto merge of rust-lang#18157 - davidbarsky:davidbarsky/respect-disabling-proc-macros-in-analysis-stats, r=Veykril
analysis-stats: respect `--disable-proc-macros` flag I noticed that this flag wasn't being respected by `analysis-stats` when profiling proc macro expansion, so here's a small fix.
2 parents 6ec41ab + f6138e2 commit 80c0682

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/cli/analysis_stats.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ impl flags::AnalysisStats {
7777
let metadata_time = db_load_sw.elapsed();
7878
let load_cargo_config = LoadCargoConfig {
7979
load_out_dirs_from_check: !self.disable_build_scripts,
80-
with_proc_macro_server: ProcMacroServerChoice::Sysroot,
80+
with_proc_macro_server: if self.disable_proc_macros {
81+
ProcMacroServerChoice::None
82+
} else {
83+
ProcMacroServerChoice::Sysroot
84+
},
8185
prefill_caches: false,
8286
};
8387

0 commit comments

Comments
 (0)