remove Cancelable from fn_scopes
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user