aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/resolving.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr/src/resolving.rs')
-rw-r--r--crates/ra_ssr/src/resolving.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ssr/src/resolving.rs b/crates/ra_ssr/src/resolving.rs
index d53bd46c7..7e7585c8b 100644
--- a/crates/ra_ssr/src/resolving.rs
+++ b/crates/ra_ssr/src/resolving.rs
@@ -4,8 +4,8 @@ use crate::errors::error;
4use crate::{parsing, SsrError}; 4use crate::{parsing, SsrError};
5use parsing::Placeholder; 5use parsing::Placeholder;
6use ra_db::FilePosition; 6use ra_db::FilePosition;
7use ra_syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken};
8use rustc_hash::FxHashMap; 7use rustc_hash::FxHashMap;
8use syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken};
9use test_utils::mark; 9use test_utils::mark;
10 10
11pub(crate) struct ResolutionScope<'db> { 11pub(crate) struct ResolutionScope<'db> {
@@ -70,7 +70,7 @@ struct Resolver<'a, 'db> {
70 70
71impl Resolver<'_, '_> { 71impl Resolver<'_, '_> {
72 fn resolve_pattern_tree(&self, pattern: SyntaxNode) -> Result<ResolvedPattern, SsrError> { 72 fn resolve_pattern_tree(&self, pattern: SyntaxNode) -> Result<ResolvedPattern, SsrError> {
73 use ra_syntax::{SyntaxElement, T}; 73 use syntax::{SyntaxElement, T};
74 let mut resolved_paths = FxHashMap::default(); 74 let mut resolved_paths = FxHashMap::default();
75 self.resolve(pattern.clone(), 0, &mut resolved_paths)?; 75 self.resolve(pattern.clone(), 0, &mut resolved_paths)?;
76 let ufcs_function_calls = resolved_paths 76 let ufcs_function_calls = resolved_paths
@@ -108,7 +108,7 @@ impl Resolver<'_, '_> {
108 depth: u32, 108 depth: u32,
109 resolved_paths: &mut FxHashMap<SyntaxNode, ResolvedPath>, 109 resolved_paths: &mut FxHashMap<SyntaxNode, ResolvedPath>,
110 ) -> Result<(), SsrError> { 110 ) -> Result<(), SsrError> {
111 use ra_syntax::ast::AstNode; 111 use syntax::ast::AstNode;
112 if let Some(path) = ast::Path::cast(node.clone()) { 112 if let Some(path) = ast::Path::cast(node.clone()) {
113 if is_self(&path) { 113 if is_self(&path) {
114 // Self cannot be resolved like other paths. 114 // Self cannot be resolved like other paths.
@@ -179,7 +179,7 @@ impl<'db> ResolutionScope<'db> {
179 sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>, 179 sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>,
180 resolve_context: FilePosition, 180 resolve_context: FilePosition,
181 ) -> ResolutionScope<'db> { 181 ) -> ResolutionScope<'db> {
182 use ra_syntax::ast::AstNode; 182 use syntax::ast::AstNode;
183 let file = sema.parse(resolve_context.file_id); 183 let file = sema.parse(resolve_context.file_id);
184 // Find a node at the requested position, falling back to the whole file. 184 // Find a node at the requested position, falling back to the whole file.
185 let node = file 185 let node = file