aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-06 17:02:39 +0100
committerGitHub <[email protected]>2021-04-06 17:02:39 +0100
commit7dd7017547c83bb3d33a785047e6da0a1464c0ad (patch)
treeb391af28f6bfaee53effcc64aeab325e95b5b461 /crates/hir_ty/src/infer.rs
parent74711deb724e0a6c84a221bfdfa15eaedbdb2300 (diff)
parente9752308bbaa2fd720e1eeaca970977fe22514d1 (diff)
Merge #8376
8376: infer: remove `record_field_resolutions` field r=flodiebold a=jonas-schievink It stores no useful data, since we can derive all fields from `variant_resolutions` Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r--crates/hir_ty/src/infer.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs
index 5146d873b..c63878e7a 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -131,8 +131,6 @@ pub struct InferenceResult {
131 method_resolutions: FxHashMap<ExprId, FunctionId>, 131 method_resolutions: FxHashMap<ExprId, FunctionId>,
132 /// For each field access expr, records the field it resolves to. 132 /// For each field access expr, records the field it resolves to.
133 field_resolutions: FxHashMap<ExprId, FieldId>, 133 field_resolutions: FxHashMap<ExprId, FieldId>,
134 /// For each field in record literal, records the field it resolves to.
135 record_field_resolutions: FxHashMap<ExprId, FieldId>,
136 record_pat_field_resolutions: FxHashMap<PatId, FieldId>, 134 record_pat_field_resolutions: FxHashMap<PatId, FieldId>,
137 /// For each struct literal, records the variant it resolves to. 135 /// For each struct literal, records the variant it resolves to.
138 variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, 136 variant_resolutions: FxHashMap<ExprOrPatId, VariantId>,
@@ -153,9 +151,6 @@ impl InferenceResult {
153 pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId> { 151 pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId> {
154 self.field_resolutions.get(&expr).copied() 152 self.field_resolutions.get(&expr).copied()
155 } 153 }
156 pub fn record_field_resolution(&self, expr: ExprId) -> Option<FieldId> {
157 self.record_field_resolutions.get(&expr).copied()
158 }
159 pub fn record_pat_field_resolution(&self, pat: PatId) -> Option<FieldId> { 154 pub fn record_pat_field_resolution(&self, pat: PatId) -> Option<FieldId> {
160 self.record_pat_field_resolutions.get(&pat).copied() 155 self.record_pat_field_resolutions.get(&pat).copied()
161 } 156 }