aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr')
-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 123bd2bb2..78d456546 100644
--- a/crates/ra_ssr/src/resolving.rs
+++ b/crates/ra_ssr/src/resolving.rs
@@ -141,14 +141,14 @@ impl Resolver<'_, '_> {
141impl<'db> ResolutionScope<'db> { 141impl<'db> ResolutionScope<'db> {
142 pub(crate) fn new( 142 pub(crate) fn new(
143 sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>, 143 sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>,
144 lookup_context: FilePosition, 144 resolve_context: FilePosition,
145 ) -> ResolutionScope<'db> { 145 ) -> ResolutionScope<'db> {
146 use ra_syntax::ast::AstNode; 146 use ra_syntax::ast::AstNode;
147 let file = sema.parse(lookup_context.file_id); 147 let file = sema.parse(resolve_context.file_id);
148 // Find a node at the requested position, falling back to the whole file. 148 // Find a node at the requested position, falling back to the whole file.
149 let node = file 149 let node = file
150 .syntax() 150 .syntax()
151 .token_at_offset(lookup_context.offset) 151 .token_at_offset(resolve_context.offset)
152 .left_biased() 152 .left_biased()
153 .map(|token| token.parent()) 153 .map(|token| token.parent())
154 .unwrap_or_else(|| file.syntax().clone()); 154 .unwrap_or_else(|| file.syntax().clone());
@@ -156,7 +156,7 @@ impl<'db> ResolutionScope<'db> {
156 let scope = sema.scope(&node); 156 let scope = sema.scope(&node);
157 ResolutionScope { 157 ResolutionScope {
158 scope, 158 scope,
159 hygiene: hir::Hygiene::new(sema.db, lookup_context.file_id.into()), 159 hygiene: hir::Hygiene::new(sema.db, resolve_context.file_id.into()),
160 } 160 }
161 } 161 }
162 162