aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr
diff options
context:
space:
mode:
authorDavid Lattimore <[email protected]>2020-07-29 10:20:40 +0100
committerDavid Lattimore <[email protected]>2020-07-29 10:20:40 +0100
commitfcb6b166fbc506950dc2689adfa4d0b728d1a745 (patch)
tree9b3db3f7d1f1e49efdd994efc891bafb01dffdef /crates/ra_ssr
parentcf55806257776baf7db6b02d260bdaa9e851c7d4 (diff)
SSR: Rename position and lookup_context to resolve_context
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