diff options
Diffstat (limited to 'crates/hir_def/src/adt.rs')
-rw-r--r-- | crates/hir_def/src/adt.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/adt.rs b/crates/hir_def/src/adt.rs index 1b9bb8235..58e35353b 100644 --- a/crates/hir_def/src/adt.rs +++ b/crates/hir_def/src/adt.rs | |||
@@ -94,7 +94,7 @@ impl StructData { | |||
94 | pub(crate) fn struct_data_query(db: &dyn DefDatabase, id: StructId) -> Arc<StructData> { | 94 | pub(crate) fn struct_data_query(db: &dyn DefDatabase, id: StructId) -> Arc<StructData> { |
95 | let loc = id.lookup(db); | 95 | let loc = id.lookup(db); |
96 | let krate = loc.container.krate; | 96 | let krate = loc.container.krate; |
97 | let item_tree = db.item_tree(loc.id.file_id); | 97 | let item_tree = loc.id.item_tree(db); |
98 | let repr = repr_from_value(db, krate, &item_tree, ModItem::from(loc.id.value).into()); | 98 | let repr = repr_from_value(db, krate, &item_tree, ModItem::from(loc.id.value).into()); |
99 | let cfg_options = db.crate_graph()[loc.container.krate].cfg_options.clone(); | 99 | let cfg_options = db.crate_graph()[loc.container.krate].cfg_options.clone(); |
100 | 100 | ||
@@ -110,7 +110,7 @@ impl StructData { | |||
110 | pub(crate) fn union_data_query(db: &dyn DefDatabase, id: UnionId) -> Arc<StructData> { | 110 | pub(crate) fn union_data_query(db: &dyn DefDatabase, id: UnionId) -> Arc<StructData> { |
111 | let loc = id.lookup(db); | 111 | let loc = id.lookup(db); |
112 | let krate = loc.container.krate; | 112 | let krate = loc.container.krate; |
113 | let item_tree = db.item_tree(loc.id.file_id); | 113 | let item_tree = loc.id.item_tree(db); |
114 | let repr = repr_from_value(db, krate, &item_tree, ModItem::from(loc.id.value).into()); | 114 | let repr = repr_from_value(db, krate, &item_tree, ModItem::from(loc.id.value).into()); |
115 | let cfg_options = db.crate_graph()[loc.container.krate].cfg_options.clone(); | 115 | let cfg_options = db.crate_graph()[loc.container.krate].cfg_options.clone(); |
116 | 116 | ||
@@ -130,7 +130,7 @@ impl EnumData { | |||
130 | pub(crate) fn enum_data_query(db: &dyn DefDatabase, e: EnumId) -> Arc<EnumData> { | 130 | pub(crate) fn enum_data_query(db: &dyn DefDatabase, e: EnumId) -> Arc<EnumData> { |
131 | let loc = e.lookup(db); | 131 | let loc = e.lookup(db); |
132 | let krate = loc.container.krate; | 132 | let krate = loc.container.krate; |
133 | let item_tree = db.item_tree(loc.id.file_id); | 133 | let item_tree = loc.id.item_tree(db); |
134 | let cfg_options = db.crate_graph()[krate].cfg_options.clone(); | 134 | let cfg_options = db.crate_graph()[krate].cfg_options.clone(); |
135 | 135 | ||
136 | let enum_ = &item_tree[loc.id.value]; | 136 | let enum_ = &item_tree[loc.id.value]; |