diff options
-rw-r--r-- | crates/ra_ide_api/src/references/rename.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/references/search_scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/references/rename.rs b/crates/ra_ide_api/src/references/rename.rs index c91dada46..0e2e088e0 100644 --- a/crates/ra_ide_api/src/references/rename.rs +++ b/crates/ra_ide_api/src/references/rename.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::ModuleSource; | 3 | use hir::ModuleSource; |
4 | use ra_db::SourceDatabase; | 4 | use ra_db::{SourceDatabase, SourceDatabaseExt}; |
5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode}; | 5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode}; |
6 | use relative_path::{RelativePath, RelativePathBuf}; | 6 | use relative_path::{RelativePath, RelativePathBuf}; |
7 | 7 | ||
diff --git a/crates/ra_ide_api/src/references/search_scope.rs b/crates/ra_ide_api/src/references/search_scope.rs index dfea18a19..680988a21 100644 --- a/crates/ra_ide_api/src/references/search_scope.rs +++ b/crates/ra_ide_api/src/references/search_scope.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::{DefWithBody, HasSource, ModuleSource}; | 3 | use hir::{DefWithBody, HasSource, ModuleSource}; |
4 | use ra_db::{FileId, SourceDatabase}; | 4 | use ra_db::{FileId, SourceDatabase, SourceDatabaseExt}; |
5 | use ra_syntax::{AstNode, TextRange}; | 5 | use ra_syntax::{AstNode, TextRange}; |
6 | 6 | ||
7 | use crate::db::RootDatabase; | 7 | use crate::db::RootDatabase; |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index e08e0dbae..307082865 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -751,6 +751,7 @@ pub fn handle_document_highlight( | |||
751 | 751 | ||
752 | Ok(Some( | 752 | Ok(Some( |
753 | refs.into_iter() | 753 | refs.into_iter() |
754 | .filter(|r| r.file_id == file_id) | ||
754 | .map(|r| DocumentHighlight { range: r.range.conv_with(&line_index), kind: None }) | 755 | .map(|r| DocumentHighlight { range: r.range.conv_with(&line_index), kind: None }) |
755 | .collect(), | 756 | .collect(), |
756 | )) | 757 | )) |