diff options
Diffstat (limited to 'crates/hir_def/src/data.rs')
-rw-r--r-- | crates/hir_def/src/data.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 7d35d7083..214bcc648 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs | |||
@@ -157,7 +157,7 @@ impl TraitData { | |||
157 | #[derive(Debug, Clone, PartialEq, Eq)] | 157 | #[derive(Debug, Clone, PartialEq, Eq)] |
158 | pub struct ImplData { | 158 | pub struct ImplData { |
159 | pub target_trait: Option<TraitRef>, | 159 | pub target_trait: Option<TraitRef>, |
160 | pub target_type: TypeRef, | 160 | pub self_ty: TypeRef, |
161 | pub items: Vec<AssocItemId>, | 161 | pub items: Vec<AssocItemId>, |
162 | pub is_negative: bool, | 162 | pub is_negative: bool, |
163 | } | 163 | } |
@@ -170,7 +170,7 @@ impl ImplData { | |||
170 | let item_tree = impl_loc.id.item_tree(db); | 170 | let item_tree = impl_loc.id.item_tree(db); |
171 | let impl_def = &item_tree[impl_loc.id.value]; | 171 | let impl_def = &item_tree[impl_loc.id.value]; |
172 | let target_trait = impl_def.target_trait.map(|id| item_tree[id].clone()); | 172 | let target_trait = impl_def.target_trait.map(|id| item_tree[id].clone()); |
173 | let target_type = item_tree[impl_def.target_type].clone(); | 173 | let self_ty = item_tree[impl_def.self_ty].clone(); |
174 | let is_negative = impl_def.is_negative; | 174 | let is_negative = impl_def.is_negative; |
175 | let module_id = impl_loc.container; | 175 | let module_id = impl_loc.container; |
176 | let container = AssocContainerId::ImplId(id); | 176 | let container = AssocContainerId::ImplId(id); |
@@ -187,7 +187,7 @@ impl ImplData { | |||
187 | ); | 187 | ); |
188 | let items = items.into_iter().map(|(_, item)| item).collect(); | 188 | let items = items.into_iter().map(|(_, item)| item).collect(); |
189 | 189 | ||
190 | Arc::new(ImplData { target_trait, target_type, items, is_negative }) | 190 | Arc::new(ImplData { target_trait, self_ty, items, is_negative }) |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||