diff options
Diffstat (limited to 'crates/hir_def/src/data.rs')
-rw-r--r-- | crates/hir_def/src/data.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 135a6698e..8732b1e3e 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs | |||
@@ -123,10 +123,11 @@ 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(); | ||
126 | 127 | ||
127 | Arc::new(TypeAliasData { | 128 | Arc::new(TypeAliasData { |
128 | name: typ.name.clone(), | 129 | name: typ.name.clone(), |
129 | type_ref: typ.type_ref.clone(), | 130 | type_ref: type_ref, |
130 | visibility: item_tree[typ.visibility].clone(), | 131 | visibility: item_tree[typ.visibility].clone(), |
131 | is_extern: typ.is_extern, | 132 | is_extern: typ.is_extern, |
132 | bounds: typ.bounds.to_vec(), | 133 | bounds: typ.bounds.to_vec(), |
@@ -202,12 +203,13 @@ impl ImplData { | |||
202 | let item_tree = impl_loc.id.item_tree(db); | 203 | let item_tree = impl_loc.id.item_tree(db); |
203 | let impl_def = &item_tree[impl_loc.id.value]; | 204 | let impl_def = &item_tree[impl_loc.id.value]; |
204 | let target_trait = impl_def.target_trait.clone(); | 205 | 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 mut expander = Expander::new(db, impl_loc.id.file_id(), module_id); | 209 | let file_id = impl_loc.id.file_id(); |
210 | let self_ty = impl_def.self_ty.clone(); | ||
210 | 211 | ||
212 | let mut expander = Expander::new(db, file_id, module_id); | ||
211 | let items = collect_items( | 213 | let items = collect_items( |
212 | db, | 214 | db, |
213 | module_id, | 215 | module_id, |