diff options
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 03b00b101..2b53b8297 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -125,7 +125,7 @@ pub struct InferenceResult { | |||
125 | field_resolutions: FxHashMap<ExprId, FieldId>, | 125 | field_resolutions: FxHashMap<ExprId, FieldId>, |
126 | /// For each field in record literal, records the field it resolves to. | 126 | /// For each field in record literal, records the field it resolves to. |
127 | record_field_resolutions: FxHashMap<ExprId, FieldId>, | 127 | record_field_resolutions: FxHashMap<ExprId, FieldId>, |
128 | record_field_pat_resolutions: FxHashMap<PatId, FieldId>, | 128 | record_pat_field_resolutions: FxHashMap<PatId, FieldId>, |
129 | /// For each struct literal, records the variant it resolves to. | 129 | /// For each struct literal, records the variant it resolves to. |
130 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, | 130 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, |
131 | /// For each associated item record what it resolves to | 131 | /// For each associated item record what it resolves to |
@@ -146,8 +146,8 @@ impl InferenceResult { | |||
146 | pub fn record_field_resolution(&self, expr: ExprId) -> Option<FieldId> { | 146 | pub fn record_field_resolution(&self, expr: ExprId) -> Option<FieldId> { |
147 | self.record_field_resolutions.get(&expr).copied() | 147 | self.record_field_resolutions.get(&expr).copied() |
148 | } | 148 | } |
149 | pub fn record_field_pat_resolution(&self, pat: PatId) -> Option<FieldId> { | 149 | pub fn record_pat_field_resolution(&self, pat: PatId) -> Option<FieldId> { |
150 | self.record_field_pat_resolutions.get(&pat).copied() | 150 | self.record_pat_field_resolutions.get(&pat).copied() |
151 | } | 151 | } |
152 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { | 152 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { |
153 | self.variant_resolutions.get(&id.into()).copied() | 153 | self.variant_resolutions.get(&id.into()).copied() |