diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-05 13:38:39 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-05 13:38:39 +0000 |
commit | 4c0bd068da39e74c66104206e27c270454e3562e (patch) | |
tree | 25e6c7005e04c3a63344f23a003614409cfda4c9 /crates/ra_hir/src/source_binder.rs | |
parent | ace661bb10dbfd596a444c235f80fa43a2845239 (diff) | |
parent | d15f300268fa955f8e9c04d51ca1dc528766f742 (diff) |
Merge #2474
2474: Move `ModuleSource`, create `ModuleOrigin` r=matklad a=ice1000
As title. This comes right after #2473
Co-authored-by: ice1000 <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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::{ | |||
14 | BodySourceMap, | 14 | BodySourceMap, |
15 | }, | 15 | }, |
16 | expr::{ExprId, PatId}, | 16 | expr::{ExprId, PatId}, |
17 | nameres::ModuleSource, | ||
17 | path::known, | 18 | path::known, |
18 | resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, | 19 | resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, |
19 | AssocItemId, DefWithBodyId, | 20 | AssocItemId, DefWithBodyId, |
@@ -46,7 +47,7 @@ fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) - | |||
46 | Some(crate::Module::from_declaration(db, src)?.id.resolver(db)) | 47 | Some(crate::Module::from_declaration(db, src)?.id.resolver(db)) |
47 | }, | 48 | }, |
48 | ast::SourceFile(it) => { | 49 | ast::SourceFile(it) => { |
49 | let src = node.with_value(crate::ModuleSource::SourceFile(it)); | 50 | let src = node.with_value(ModuleSource::SourceFile(it)); |
50 | Some(crate::Module::from_definition(db, src)?.id.resolver(db)) | 51 | Some(crate::Module::from_definition(db, src)?.id.resolver(db)) |
51 | }, | 52 | }, |
52 | ast::StructDef(it) => { | 53 | ast::StructDef(it) => { |