aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/data.rs')
-rw-r--r--crates/hir_def/src/data.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs
index 8732b1e3e..135a6698e 100644
--- a/crates/hir_def/src/data.rs
+++ b/crates/hir_def/src/data.rs
@@ -123,11 +123,10 @@ impl TypeAliasData {
123 let loc = typ.lookup(db); 123 let loc = typ.lookup(db);
124 let item_tree = loc.id.item_tree(db); 124 let item_tree = loc.id.item_tree(db);
125 let typ = &item_tree[loc.id.value]; 125 let typ = &item_tree[loc.id.value];
126 let type_ref = typ.type_ref.clone();
127 126
128 Arc::new(TypeAliasData { 127 Arc::new(TypeAliasData {
129 name: typ.name.clone(), 128 name: typ.name.clone(),
130 type_ref: type_ref, 129 type_ref: typ.type_ref.clone(),
131 visibility: item_tree[typ.visibility].clone(), 130 visibility: item_tree[typ.visibility].clone(),
132 is_extern: typ.is_extern, 131 is_extern: typ.is_extern,
133 bounds: typ.bounds.to_vec(), 132 bounds: typ.bounds.to_vec(),
@@ -203,13 +202,12 @@ impl ImplData {
203 let item_tree = impl_loc.id.item_tree(db); 202 let item_tree = impl_loc.id.item_tree(db);
204 let impl_def = &item_tree[impl_loc.id.value]; 203 let impl_def = &item_tree[impl_loc.id.value];
205 let target_trait = impl_def.target_trait.clone(); 204 let target_trait = impl_def.target_trait.clone();
205 let self_ty = impl_def.self_ty.clone();
206 let is_negative = impl_def.is_negative; 206 let is_negative = impl_def.is_negative;
207 let module_id = impl_loc.container; 207 let module_id = impl_loc.container;
208 let container = AssocContainerId::ImplId(id); 208 let container = AssocContainerId::ImplId(id);
209 let file_id = impl_loc.id.file_id(); 209 let mut expander = Expander::new(db, impl_loc.id.file_id(), module_id);
210 let self_ty = impl_def.self_ty.clone();
211 210
212 let mut expander = Expander::new(db, file_id, module_id);
213 let items = collect_items( 211 let items = collect_items(
214 db, 212 db,
215 module_id, 213 module_id,