aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r--crates/ra_hir/src/code_model.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index fd7776fb7..905bb5bcb 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -12,13 +12,14 @@ use hir_def::{
12 per_ns::PerNs, 12 per_ns::PerNs,
13 resolver::{HasResolver, TypeNs}, 13 resolver::{HasResolver, TypeNs},
14 type_ref::TypeRef, 14 type_ref::TypeRef,
15 ContainerId, HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, 15 AstItemDef, ConstId, ContainerId, EnumId, FunctionId, HasModule, ImplId, LocalEnumVariantId,
16 LocalStructFieldId, Lookup, ModuleId, UnionId, 16 LocalImportId, LocalModuleId, LocalStructFieldId, Lookup, ModuleId, StaticId, StructId,
17 TraitId, TypeAliasId, UnionId,
17}; 18};
18use hir_expand::{ 19use hir_expand::{
19 diagnostics::DiagnosticSink, 20 diagnostics::DiagnosticSink,
20 name::{self, AsName}, 21 name::{self, AsName},
21 AstId, 22 AstId, MacroDefId,
22}; 23};
23use ra_db::{CrateId, Edition, FileId, FilePosition}; 24use ra_db::{CrateId, Edition, FileId, FilePosition};
24use ra_syntax::{ast, AstNode, SyntaxNode}; 25use ra_syntax::{ast, AstNode, SyntaxNode};
@@ -26,10 +27,6 @@ use ra_syntax::{ast, AstNode, SyntaxNode};
26use crate::{ 27use crate::{
27 db::{DefDatabase, HirDatabase}, 28 db::{DefDatabase, HirDatabase},
28 expr::{BindingAnnotation, Body, BodySourceMap, ExprValidator, Pat, PatId}, 29 expr::{BindingAnnotation, Body, BodySourceMap, ExprValidator, Pat, PatId},
29 ids::{
30 AstItemDef, ConstId, EnumId, FunctionId, MacroDefId, StaticId, StructId, TraitId,
31 TypeAliasId,
32 },
33 ty::{InferenceResult, Namespace, TraitRef}, 30 ty::{InferenceResult, Namespace, TraitRef},
34 Either, HasSource, Name, Source, Ty, 31 Either, HasSource, Name, Source, Ty,
35}; 32};
@@ -737,7 +734,7 @@ pub struct Static {
737 734
738impl Static { 735impl Static {
739 pub fn module(self, db: &impl DefDatabase) -> Module { 736 pub fn module(self, db: &impl DefDatabase) -> Module {
740 Module { id: self.id.module(db) } 737 Module { id: self.id.lookup(db).module(db) }
741 } 738 }
742 739
743 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 740 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {