mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Make AssistContext::frange private
This commit is contained in:
parent
086563f751
commit
ccad89a2db
15 changed files with 31 additions and 24 deletions
|
@ -309,7 +309,7 @@ impl LocalUsages {
|
|||
Self(
|
||||
Definition::Local(var)
|
||||
.usages(&ctx.sema)
|
||||
.in_scope(SearchScope::single_file(ctx.frange.file_id))
|
||||
.in_scope(SearchScope::single_file(ctx.file_id()))
|
||||
.all(),
|
||||
)
|
||||
}
|
||||
|
@ -1039,7 +1039,7 @@ fn is_defined_outside_of_body(
|
|||
body: &FunctionBody,
|
||||
src: &hir::InFile<Either<ast::IdentPat, ast::SelfParam>>,
|
||||
) -> bool {
|
||||
src.file_id.original_file(ctx.db()) == ctx.frange.file_id
|
||||
src.file_id.original_file(ctx.db()) == ctx.file_id()
|
||||
&& !body.contains_node(either_syntax(&src.value))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue