diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/project_model/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/project_model/src/workspace.rs | 3 | ||||
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/crates/project_model/Cargo.toml b/crates/project_model/Cargo.toml index 436eff16b..293cb5bfe 100644 --- a/crates/project_model/Cargo.toml +++ b/crates/project_model/Cargo.toml | |||
@@ -25,3 +25,4 @@ toolchain = { path = "../toolchain", version = "0.0.0" } | |||
25 | proc_macro_api = { path = "../proc_macro_api", version = "0.0.0" } | 25 | proc_macro_api = { path = "../proc_macro_api", version = "0.0.0" } |
26 | paths = { path = "../paths", version = "0.0.0" } | 26 | paths = { path = "../paths", version = "0.0.0" } |
27 | stdx = { path = "../stdx", version = "0.0.0" } | 27 | stdx = { path = "../stdx", version = "0.0.0" } |
28 | profile = { path = "../profile", version = "0.0.0" } | ||
diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs index 06a0be284..c511320d7 100644 --- a/crates/project_model/src/workspace.rs +++ b/crates/project_model/src/workspace.rs | |||
@@ -207,6 +207,7 @@ impl ProjectWorkspace { | |||
207 | proc_macro_client: Option<&ProcMacroClient>, | 207 | proc_macro_client: Option<&ProcMacroClient>, |
208 | load: &mut dyn FnMut(&AbsPath) -> Option<FileId>, | 208 | load: &mut dyn FnMut(&AbsPath) -> Option<FileId>, |
209 | ) -> CrateGraph { | 209 | ) -> CrateGraph { |
210 | let _p = profile::span("ProjectWorkspace::to_crate_graph"); | ||
210 | let proc_macro_loader = |path: &Path| match proc_macro_client { | 211 | let proc_macro_loader = |path: &Path| match proc_macro_client { |
211 | Some(client) => client.by_dylib_path(path), | 212 | Some(client) => client.by_dylib_path(path), |
212 | None => Vec::new(), | 213 | None => Vec::new(), |
@@ -299,6 +300,7 @@ fn cargo_to_crate_graph( | |||
299 | sysroot: &Sysroot, | 300 | sysroot: &Sysroot, |
300 | rustc: &Option<CargoWorkspace>, | 301 | rustc: &Option<CargoWorkspace>, |
301 | ) -> CrateGraph { | 302 | ) -> CrateGraph { |
303 | let _p = profile::span("cargo_to_crate_graph"); | ||
302 | let mut crate_graph = CrateGraph::default(); | 304 | let mut crate_graph = CrateGraph::default(); |
303 | let (public_deps, libproc_macro) = | 305 | let (public_deps, libproc_macro) = |
304 | sysroot_to_crate_graph(&mut crate_graph, sysroot, target, load); | 306 | sysroot_to_crate_graph(&mut crate_graph, sysroot, target, load); |
@@ -493,6 +495,7 @@ fn sysroot_to_crate_graph( | |||
493 | target: Option<&str>, | 495 | target: Option<&str>, |
494 | load: &mut dyn FnMut(&AbsPath) -> Option<FileId>, | 496 | load: &mut dyn FnMut(&AbsPath) -> Option<FileId>, |
495 | ) -> (Vec<(CrateName, CrateId)>, Option<CrateId>) { | 497 | ) -> (Vec<(CrateName, CrateId)>, Option<CrateId>) { |
498 | let _p = profile::span("sysroot_to_crate_graph"); | ||
496 | let mut cfg_options = CfgOptions::default(); | 499 | let mut cfg_options = CfgOptions::default(); |
497 | cfg_options.extend(get_rustc_cfg_options(target)); | 500 | cfg_options.extend(get_rustc_cfg_options(target)); |
498 | let sysroot_crates: FxHashMap<SysrootCrate, CrateId> = sysroot | 501 | let sysroot_crates: FxHashMap<SysrootCrate, CrateId> = sysroot |
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 97e20362f..34e3cfe68 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -274,6 +274,7 @@ impl GlobalState { | |||
274 | } | 274 | } |
275 | 275 | ||
276 | fn reload_flycheck(&mut self) { | 276 | fn reload_flycheck(&mut self) { |
277 | let _p = profile::span("GlobalState::reload_flycheck"); | ||
277 | let config = match self.config.flycheck() { | 278 | let config = match self.config.flycheck() { |
278 | Some(it) => it, | 279 | Some(it) => it, |
279 | None => { | 280 | None => { |