From 38853459e3d964cc7f635829cdc66f5faee33d85 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Tue, 3 Dec 2019 15:24:02 -0500 Subject: Add `ModuleSource::Block` --- crates/ra_hir/src/source_binder.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 28d41b647..db0451059 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -14,6 +14,7 @@ use hir_def::{ BodySourceMap, }, expr::{ExprId, PatId}, + nameres::ModuleSource, path::known, resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, AssocItemId, DefWithBodyId, @@ -46,7 +47,7 @@ fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) - Some(crate::Module::from_declaration(db, src)?.id.resolver(db)) }, ast::SourceFile(it) => { - let src = node.with_value(crate::ModuleSource::SourceFile(it)); + let src = node.with_value(ModuleSource::SourceFile(it)); Some(crate::Module::from_definition(db, src)?.id.resolver(db)) }, ast::StructDef(it) => { -- cgit v1.2.3