aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-25 14:25:24 +0100
committerAleksey Kladov <[email protected]>2018-10-25 14:25:40 +0100
commit772acb53f2d7568ff1cc2ba4ca84a47110f13b3a (patch)
treed9d30baaee8b6cd13cb30c38b7c854264c15f2b2 /crates/ra_lsp_server
parent171acad15b1eacdfb12612a7615f4f6b21e5bf99 (diff)
use correct file when resolving callables
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/path_map.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/path_map.rs b/crates/ra_lsp_server/src/path_map.rs
index b3d1dc3db..d5957d673 100644
--- a/crates/ra_lsp_server/src/path_map.rs
+++ b/crates/ra_lsp_server/src/path_map.rs
@@ -1,4 +1,7 @@
1use std::path::{Component, Path, PathBuf}; 1use std::{
2 fmt,
3 path::{Component, Path, PathBuf},
4};
2 5
3use im; 6use im;
4use ra_analysis::{FileId, FileResolver}; 7use ra_analysis::{FileId, FileResolver};
@@ -10,7 +13,7 @@ pub enum Root {
10 Lib, 13 Lib,
11} 14}
12 15
13#[derive(Debug, Default, Clone)] 16#[derive(Default, Clone)]
14pub struct PathMap { 17pub struct PathMap {
15 next_id: u32, 18 next_id: u32,
16 path2id: im::HashMap<PathBuf, FileId>, 19 path2id: im::HashMap<PathBuf, FileId>,
@@ -18,6 +21,12 @@ pub struct PathMap {
18 id2root: im::HashMap<FileId, Root>, 21 id2root: im::HashMap<FileId, Root>,
19} 22}
20 23
24impl fmt::Debug for PathMap {
25 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26 f.write_str("PathMap { ... }")
27 }
28}
29
21impl PathMap { 30impl PathMap {
22 pub fn new() -> PathMap { 31 pub fn new() -> PathMap {
23 Default::default() 32 Default::default()