diff options
-rw-r--r-- | crates/rust-analyzer/src/cli.rs | 1 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/load_cargo.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/cli.rs b/crates/rust-analyzer/src/cli.rs index 76b666dc2..25ebcc0ec 100644 --- a/crates/rust-analyzer/src/cli.rs +++ b/crates/rust-analyzer/src/cli.rs | |||
@@ -16,7 +16,6 @@ use vfs::Vfs; | |||
16 | pub use self::{ | 16 | pub use self::{ |
17 | analysis_stats::AnalysisStatsCmd, | 17 | analysis_stats::AnalysisStatsCmd, |
18 | diagnostics::diagnostics, | 18 | diagnostics::diagnostics, |
19 | load_cargo::{load_workspace, load_workspace_at, LoadCargoConfig}, | ||
20 | ssr::{apply_ssr_rules, search_for_patterns}, | 19 | ssr::{apply_ssr_rules, search_for_patterns}, |
21 | }; | 20 | }; |
22 | 21 | ||
diff --git a/crates/rust-analyzer/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs index 8cee65478..b1c0e015d 100644 --- a/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/crates/rust-analyzer/src/cli/load_cargo.rs | |||
@@ -33,7 +33,7 @@ pub fn load_workspace_at( | |||
33 | load_workspace(workspace, load_config, progress) | 33 | load_workspace(workspace, load_config, progress) |
34 | } | 34 | } |
35 | 35 | ||
36 | pub fn load_workspace( | 36 | fn load_workspace( |
37 | ws: ProjectWorkspace, | 37 | ws: ProjectWorkspace, |
38 | config: &LoadCargoConfig, | 38 | config: &LoadCargoConfig, |
39 | progress: &dyn Fn(String), | 39 | progress: &dyn Fn(String), |
@@ -82,6 +82,8 @@ pub fn load_workspace( | |||
82 | log::debug!("crate graph: {:?}", crate_graph); | 82 | log::debug!("crate graph: {:?}", crate_graph); |
83 | let host = | 83 | let host = |
84 | load_crate_graph(crate_graph, project_folders.source_root_config, &mut vfs, &receiver); | 84 | load_crate_graph(crate_graph, project_folders.source_root_config, &mut vfs, &receiver); |
85 | |||
86 | host.analysis().prime_caches(|_| {})?; | ||
85 | Ok((host, vfs, proc_macro_client)) | 87 | Ok((host, vfs, proc_macro_client)) |
86 | } | 88 | } |
87 | 89 | ||