File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ pub fn parse_search_replace(
59
59
rule : & str ,
60
60
parse_only : bool ,
61
61
db : & RootDatabase ,
62
- position : FilePosition ,
62
+ resolve_context : FilePosition ,
63
63
selections : Vec < FileRange > ,
64
64
) -> Result < Vec < SourceFileEdit > , SsrError > {
65
65
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) ;
67
67
match_finder. add_rule ( rule) ?;
68
68
if parse_only {
69
69
return Ok ( Vec :: new ( ) ) ;
Original file line number Diff line number Diff line change @@ -141,22 +141,22 @@ impl Resolver<'_, '_> {
141
141
impl < ' db > ResolutionScope < ' db > {
142
142
pub ( crate ) fn new (
143
143
sema : & hir:: Semantics < ' db , ra_ide_db:: RootDatabase > ,
144
- lookup_context : FilePosition ,
144
+ resolve_context : FilePosition ,
145
145
) -> ResolutionScope < ' db > {
146
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
148
// Find a node at the requested position, falling back to the whole file.
149
149
let node = file
150
150
. syntax ( )
151
- . token_at_offset ( lookup_context . offset )
151
+ . token_at_offset ( resolve_context . offset )
152
152
. left_biased ( )
153
153
. map ( |token| token. parent ( ) )
154
154
. unwrap_or_else ( || file. syntax ( ) . clone ( ) ) ;
155
155
let node = pick_node_for_resolution ( node) ;
156
156
let scope = sema. scope ( & node) ;
157
157
ResolutionScope {
158
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
You can’t perform that action at this time.
0 commit comments