diff options
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index c7c3c0bc7..7c0d93691 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs | |||
@@ -12,7 +12,7 @@ use ra_prof::profile; | |||
12 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner, VisibilityOwner}; | 12 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner, VisibilityOwner}; |
13 | 13 | ||
14 | use crate::{ | 14 | use crate::{ |
15 | body::Expander, db::DefDatabase, src::HasChildSource, src::HasSource, trace::Trace, | 15 | body::CfgExpander, db::DefDatabase, src::HasChildSource, src::HasSource, trace::Trace, |
16 | type_ref::TypeRef, visibility::RawVisibility, EnumId, HasModule, LocalEnumVariantId, | 16 | type_ref::TypeRef, visibility::RawVisibility, EnumId, HasModule, LocalEnumVariantId, |
17 | LocalStructFieldId, Lookup, ModuleId, StructId, UnionId, VariantId, | 17 | LocalStructFieldId, Lookup, ModuleId, StructId, UnionId, VariantId, |
18 | }; | 18 | }; |
@@ -124,7 +124,7 @@ fn lower_enum( | |||
124 | 124 | ||
125 | impl VariantData { | 125 | impl VariantData { |
126 | fn new(db: &dyn DefDatabase, flavor: InFile<ast::StructKind>, module_id: ModuleId) -> Self { | 126 | fn new(db: &dyn DefDatabase, flavor: InFile<ast::StructKind>, module_id: ModuleId) -> Self { |
127 | let mut expander = Expander::new(db, flavor.file_id, module_id); | 127 | let mut expander = CfgExpander::new(db, flavor.file_id, module_id.krate); |
128 | let mut trace = Trace::new_for_arena(); | 128 | let mut trace = Trace::new_for_arena(); |
129 | match lower_struct(db, &mut expander, &mut trace, &flavor) { | 129 | match lower_struct(db, &mut expander, &mut trace, &flavor) { |
130 | StructKind::Tuple => VariantData::Tuple(trace.into_arena()), | 130 | StructKind::Tuple => VariantData::Tuple(trace.into_arena()), |
@@ -178,7 +178,7 @@ impl HasChildSource for VariantId { | |||
178 | it.lookup(db).container.module(db), | 178 | it.lookup(db).container.module(db), |
179 | ), | 179 | ), |
180 | }; | 180 | }; |
181 | let mut expander = Expander::new(db, src.file_id, module_id); | 181 | let mut expander = CfgExpander::new(db, src.file_id, module_id.krate); |
182 | let mut trace = Trace::new_for_map(); | 182 | let mut trace = Trace::new_for_map(); |
183 | lower_struct(db, &mut expander, &mut trace, &src); | 183 | lower_struct(db, &mut expander, &mut trace, &src); |
184 | src.with_value(trace.into_map()) | 184 | src.with_value(trace.into_map()) |
@@ -194,7 +194,7 @@ pub enum StructKind { | |||
194 | 194 | ||
195 | fn lower_struct( | 195 | fn lower_struct( |
196 | db: &dyn DefDatabase, | 196 | db: &dyn DefDatabase, |
197 | expander: &mut Expander, | 197 | expander: &mut CfgExpander, |
198 | trace: &mut Trace<StructFieldData, Either<ast::TupleFieldDef, ast::RecordFieldDef>>, | 198 | trace: &mut Trace<StructFieldData, Either<ast::TupleFieldDef, ast::RecordFieldDef>>, |
199 | ast: &InFile<ast::StructKind>, | 199 | ast: &InFile<ast::StructKind>, |
200 | ) -> StructKind { | 200 | ) -> StructKind { |