mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
remove Cancelable from fn_scopes
This commit is contained in:
parent
040a622c52
commit
18e9a710cd
8 changed files with 13 additions and 13 deletions
|
@ -15,7 +15,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) ->
|
|||
None => return Ok(()),
|
||||
};
|
||||
if let Some(function) = &ctx.function {
|
||||
let scopes = function.scopes(ctx.db)?;
|
||||
let scopes = function.scopes(ctx.db);
|
||||
complete_fn(acc, &scopes, ctx.offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ pub(crate) fn reference_definition(
|
|||
if let Some(function) =
|
||||
hir::source_binder::function_from_child_node(db, file_id, name_ref.syntax())
|
||||
{
|
||||
let scope = function.scopes(db)?;
|
||||
let scope = function.scopes(db);
|
||||
// First try to resolve the symbol locally
|
||||
if let Some(entry) = scope.resolve_local_name(name_ref) {
|
||||
let nav = NavigationTarget::from_scope_entry(file_id, &entry);
|
||||
|
|
|
@ -128,7 +128,7 @@ impl db::RootDatabase {
|
|||
.collect::<Vec<_>>();
|
||||
ret.extend(
|
||||
descr
|
||||
.scopes(self)?
|
||||
.scopes(self)
|
||||
.find_all_refs(binding)
|
||||
.into_iter()
|
||||
.map(|ref_desc| (position.file_id, ref_desc.range)),
|
||||
|
@ -156,7 +156,7 @@ impl db::RootDatabase {
|
|||
position.file_id,
|
||||
name_ref.syntax(),
|
||||
));
|
||||
let scope = descr.scopes(db)?;
|
||||
let scope = descr.scopes(db);
|
||||
let resolved = ctry!(scope.resolve_local_name(name_ref));
|
||||
let resolved = resolved.ptr().resolve(source_file);
|
||||
let binding = ctry!(find_node_at_offset::<ast::BindPat>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue