Skip to content

Commit fcb6b16

Browse files
SSR: Rename position and lookup_context to resolve_context
1 parent cf55806 commit fcb6b16

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/ra_ide/src/ssr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ pub fn parse_search_replace(
5959
rule: &str,
6060
parse_only: bool,
6161
db: &RootDatabase,
62-
position: FilePosition,
62+
resolve_context: FilePosition,
6363
selections: Vec<FileRange>,
6464
) -> Result<Vec<SourceFileEdit>, SsrError> {
6565
let rule: SsrRule = rule.parse()?;
66-
let mut match_finder = MatchFinder::in_context(db, position, selections);
66+
let mut match_finder = MatchFinder::in_context(db, resolve_context, selections);
6767
match_finder.add_rule(rule)?;
6868
if parse_only {
6969
return Ok(Vec::new());

crates/ra_ssr/src/resolving.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,22 @@ impl Resolver<'_, '_> {
141141
impl<'db> ResolutionScope<'db> {
142142
pub(crate) fn new(
143143
sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>,
144-
lookup_context: FilePosition,
144+
resolve_context: FilePosition,
145145
) -> ResolutionScope<'db> {
146146
use ra_syntax::ast::AstNode;
147-
let file = sema.parse(lookup_context.file_id);
147+
let file = sema.parse(resolve_context.file_id);
148148
// Find a node at the requested position, falling back to the whole file.
149149
let node = file
150150
.syntax()
151-
.token_at_offset(lookup_context.offset)
151+
.token_at_offset(resolve_context.offset)
152152
.left_biased()
153153
.map(|token| token.parent())
154154
.unwrap_or_else(|| file.syntax().clone());
155155
let node = pick_node_for_resolution(node);
156156
let scope = sema.scope(&node);
157157
ResolutionScope {
158158
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()),
160160
}
161161
}
162162

0 commit comments

Comments
 (0)