diff options
author | Edwin Cheng <[email protected]> | 2021-03-14 10:31:14 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2021-03-14 10:31:14 +0000 |
commit | 8cc0c7f420d7d59a4fd162d893eaad54aa4b7f22 (patch) | |
tree | a9b4c6b7ed37299c192b68657ac52db851f8e50a /crates/rust-analyzer/src/cli | |
parent | ab3f584299d44a0187c2977a0e0ebf8727bc9e40 (diff) |
Add no-sysroot flag for analysis-stats
Diffstat (limited to 'crates/rust-analyzer/src/cli')
-rw-r--r-- | crates/rust-analyzer/src/cli/analysis_stats.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index c81c1d26e..9c59e7ee4 100644 --- a/crates/rust-analyzer/src/cli/analysis_stats.rs +++ b/crates/rust-analyzer/src/cli/analysis_stats.rs | |||
@@ -19,6 +19,7 @@ use ide_db::base_db::{ | |||
19 | }; | 19 | }; |
20 | use itertools::Itertools; | 20 | use itertools::Itertools; |
21 | use oorandom::Rand32; | 21 | use oorandom::Rand32; |
22 | use project_model::CargoConfig; | ||
22 | use rayon::prelude::*; | 23 | use rayon::prelude::*; |
23 | use rustc_hash::FxHashSet; | 24 | use rustc_hash::FxHashSet; |
24 | use stdx::format_to; | 25 | use stdx::format_to; |
@@ -46,6 +47,7 @@ pub struct AnalysisStatsCmd { | |||
46 | pub memory_usage: bool, | 47 | pub memory_usage: bool, |
47 | pub only: Option<String>, | 48 | pub only: Option<String>, |
48 | pub with_deps: bool, | 49 | pub with_deps: bool, |
50 | pub no_sysroot: bool, | ||
49 | pub path: PathBuf, | 51 | pub path: PathBuf, |
50 | pub load_output_dirs: bool, | 52 | pub load_output_dirs: bool, |
51 | pub with_proc_macro: bool, | 53 | pub with_proc_macro: bool, |
@@ -59,7 +61,8 @@ impl AnalysisStatsCmd { | |||
59 | }; | 61 | }; |
60 | 62 | ||
61 | let mut db_load_sw = self.stop_watch(); | 63 | let mut db_load_sw = self.stop_watch(); |
62 | let cargo_config = Default::default(); | 64 | let mut cargo_config = CargoConfig::default(); |
65 | cargo_config.no_sysroot = self.no_sysroot; | ||
63 | let load_cargo_config = LoadCargoConfig { | 66 | let load_cargo_config = LoadCargoConfig { |
64 | load_out_dirs_from_check: self.load_output_dirs, | 67 | load_out_dirs_from_check: self.load_output_dirs, |
65 | with_proc_macro: self.with_proc_macro, | 68 | with_proc_macro: self.with_proc_macro, |