diff options
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | crates/proc_macro_api/Cargo.toml | 7 | ||||
-rw-r--r-- | crates/proc_macro_api/src/lib.rs | 1 | ||||
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock index 98141f5cd..907973412 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -1175,6 +1175,7 @@ dependencies = [ | |||
1175 | "log", | 1175 | "log", |
1176 | "memmap", | 1176 | "memmap", |
1177 | "object", | 1177 | "object", |
1178 | "profile", | ||
1178 | "serde", | 1179 | "serde", |
1179 | "serde_json", | 1180 | "serde_json", |
1180 | "snap", | 1181 | "snap", |
diff --git a/crates/proc_macro_api/Cargo.toml b/crates/proc_macro_api/Cargo.toml index 16fd56c7e..1ba1e4abd 100644 --- a/crates/proc_macro_api/Cargo.toml +++ b/crates/proc_macro_api/Cargo.toml | |||
@@ -15,10 +15,11 @@ serde_json = { version = "1.0", features = ["unbounded_depth"] } | |||
15 | log = "0.4.8" | 15 | log = "0.4.8" |
16 | crossbeam-channel = "0.5.0" | 16 | crossbeam-channel = "0.5.0" |
17 | jod-thread = "0.1.1" | 17 | jod-thread = "0.1.1" |
18 | memmap = "0.7.0" | ||
19 | object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] } | ||
20 | snap = "1.0" | ||
18 | 21 | ||
19 | tt = { path = "../tt", version = "0.0.0" } | 22 | tt = { path = "../tt", version = "0.0.0" } |
20 | base_db = { path = "../base_db", version = "0.0.0" } | 23 | base_db = { path = "../base_db", version = "0.0.0" } |
21 | stdx = { path = "../stdx", version = "0.0.0" } | 24 | stdx = { path = "../stdx", version = "0.0.0" } |
22 | snap = "1" | 25 | profile = { path = "../profile", version = "0.0.0" } |
23 | object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] } | ||
24 | memmap = "0.7.0" | ||
diff --git a/crates/proc_macro_api/src/lib.rs b/crates/proc_macro_api/src/lib.rs index 2dd2a8541..654bd9943 100644 --- a/crates/proc_macro_api/src/lib.rs +++ b/crates/proc_macro_api/src/lib.rs | |||
@@ -77,6 +77,7 @@ impl ProcMacroClient { | |||
77 | } | 77 | } |
78 | 78 | ||
79 | pub fn by_dylib_path(&self, dylib_path: &Path) -> Vec<ProcMacro> { | 79 | pub fn by_dylib_path(&self, dylib_path: &Path) -> Vec<ProcMacro> { |
80 | let _p = profile::span("ProcMacroClient::by_dylib_path"); | ||
80 | match version::read_dylib_info(dylib_path) { | 81 | match version::read_dylib_info(dylib_path) { |
81 | Ok(info) => { | 82 | Ok(info) => { |
82 | if info.version.0 < 1 || info.version.1 < 47 { | 83 | if info.version.0 < 1 || info.version.1 < 47 { |
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index e51532d88..0ae2758cc 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -322,6 +322,7 @@ impl GlobalState { | |||
322 | let loader = &mut self.loader; | 322 | let loader = &mut self.loader; |
323 | let mem_docs = &self.mem_docs; | 323 | let mem_docs = &self.mem_docs; |
324 | let mut load = |path: &AbsPath| { | 324 | let mut load = |path: &AbsPath| { |
325 | let _p = profile::span("GlobalState::load"); | ||
325 | let vfs_path = vfs::VfsPath::from(path.to_path_buf()); | 326 | let vfs_path = vfs::VfsPath::from(path.to_path_buf()); |
326 | if !mem_docs.contains_key(&vfs_path) { | 327 | if !mem_docs.contains_key(&vfs_path) { |
327 | let contents = loader.handle.load_sync(path); | 328 | let contents = loader.handle.load_sync(path); |