aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/source_binder.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 8c4b635d2..2957e496c 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -37,7 +37,7 @@ use crate::{
37 InEnvironment, TraitEnvironment, Ty, 37 InEnvironment, TraitEnvironment, Ty,
38 }, 38 },
39 Adt, AssocItem, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, GenericParam, 39 Adt, AssocItem, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, GenericParam,
40 Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias, 40 ImplBlock, Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias,
41}; 41};
42 42
43fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> { 43fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> {
@@ -59,6 +59,10 @@ fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -
59 let src = node.with_value(it); 59 let src = node.with_value(it);
60 Some(Enum::from_source(db, src)?.id.resolver(db)) 60 Some(Enum::from_source(db, src)?.id.resolver(db))
61 }, 61 },
62 ast::ImplBlock(it) => {
63 let src = node.with_value(it);
64 Some(ImplBlock::from_source(db, src)?.id.resolver(db))
65 },
62 _ => match node.value.kind() { 66 _ => match node.value.kind() {
63 FN_DEF | CONST_DEF | STATIC_DEF => { 67 FN_DEF | CONST_DEF | STATIC_DEF => {
64 let def = def_with_body_from_child_node(db, node)?; 68 let def = def_with_body_from_child_node(db, node)?;