diff options
author | Aleksey Kladov <[email protected]> | 2018-10-25 14:25:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-25 14:25:40 +0100 |
commit | 772acb53f2d7568ff1cc2ba4ca84a47110f13b3a (patch) | |
tree | d9d30baaee8b6cd13cb30c38b7c854264c15f2b2 /crates/ra_lsp_server | |
parent | 171acad15b1eacdfb12612a7615f4f6b21e5bf99 (diff) |
use correct file when resolving callables
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/path_map.rs | 13 |
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 @@ | |||
1 | use std::path::{Component, Path, PathBuf}; | 1 | use std::{ |
2 | fmt, | ||
3 | path::{Component, Path, PathBuf}, | ||
4 | }; | ||
2 | 5 | ||
3 | use im; | 6 | use im; |
4 | use ra_analysis::{FileId, FileResolver}; | 7 | use 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)] |
14 | pub struct PathMap { | 17 | pub 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 | ||
24 | impl fmt::Debug for PathMap { | ||
25 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
26 | f.write_str("PathMap { ... }") | ||
27 | } | ||
28 | } | ||
29 | |||
21 | impl PathMap { | 30 | impl PathMap { |
22 | pub fn new() -> PathMap { | 31 | pub fn new() -> PathMap { |
23 | Default::default() | 32 | Default::default() |