diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-06 18:44:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-06 18:44:58 +0100 |
commit | 52c0ecb9825853d83357ccbac9f6fcb4bffa7348 (patch) | |
tree | cce18424094010e01c366703f4ed771a3e1dd479 /crates/hir_ty/src/infer.rs | |
parent | e6a1c9ca60c19bf3b02b302e21d9f9fd9bd8a466 (diff) | |
parent | 230c763648ad87e07d843a52c134b12d1b7397f4 (diff) |
Merge #8380
8380: infer: remove `record_pat_field_resolutions` field r=jonas-schievink a=jonas-schievink
Same as https://github.com/rust-analyzer/rust-analyzer/pull/8376, this
can be computed from other data
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index c63878e7a..efe9198cc 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -131,8 +131,7 @@ 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 | record_pat_field_resolutions: FxHashMap<PatId, FieldId>, | 134 | /// For each struct literal or pattern, records the variant it resolves to. |
135 | /// For each struct literal, records the variant it resolves to. | ||
136 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, | 135 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, |
137 | /// For each associated item record what it resolves to | 136 | /// For each associated item record what it resolves to |
138 | assoc_resolutions: FxHashMap<ExprOrPatId, AssocItemId>, | 137 | assoc_resolutions: FxHashMap<ExprOrPatId, AssocItemId>, |
@@ -151,9 +150,6 @@ impl InferenceResult { | |||
151 | pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId> { | 150 | pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId> { |
152 | self.field_resolutions.get(&expr).copied() | 151 | self.field_resolutions.get(&expr).copied() |
153 | } | 152 | } |
154 | pub fn record_pat_field_resolution(&self, pat: PatId) -> Option<FieldId> { | ||
155 | self.record_pat_field_resolutions.get(&pat).copied() | ||
156 | } | ||
157 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { | 153 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { |
158 | self.variant_resolutions.get(&id.into()).copied() | 154 | self.variant_resolutions.get(&id.into()).copied() |
159 | } | 155 | } |