diff options
author | Jonas Schievink <[email protected]> | 2021-04-06 16:59:18 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-06 16:59:18 +0100 |
commit | e9752308bbaa2fd720e1eeaca970977fe22514d1 (patch) | |
tree | b391af28f6bfaee53effcc64aeab325e95b5b461 /crates/hir_ty/src/utils.rs | |
parent | 74711deb724e0a6c84a221bfdfa15eaedbdb2300 (diff) |
infer: remove `record_field_resolutions` field
It stores no useful data, since we can derive all fields from
`variant_resolutions`
Diffstat (limited to 'crates/hir_ty/src/utils.rs')
-rw-r--r-- | crates/hir_ty/src/utils.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/crates/hir_ty/src/utils.rs b/crates/hir_ty/src/utils.rs index d11708299..0a424f607 100644 --- a/crates/hir_ty/src/utils.rs +++ b/crates/hir_ty/src/utils.rs | |||
@@ -4,7 +4,6 @@ use std::sync::Arc; | |||
4 | 4 | ||
5 | use chalk_ir::{BoundVar, DebruijnIndex}; | 5 | use chalk_ir::{BoundVar, DebruijnIndex}; |
6 | use hir_def::{ | 6 | use hir_def::{ |
7 | adt::VariantData, | ||
8 | db::DefDatabase, | 7 | db::DefDatabase, |
9 | generics::{ | 8 | generics::{ |
10 | GenericParams, TypeParamData, TypeParamProvenance, WherePredicate, WherePredicateTypeTarget, | 9 | GenericParams, TypeParamData, TypeParamProvenance, WherePredicate, WherePredicateTypeTarget, |
@@ -13,7 +12,7 @@ use hir_def::{ | |||
13 | path::Path, | 12 | path::Path, |
14 | resolver::{HasResolver, TypeNs}, | 13 | resolver::{HasResolver, TypeNs}, |
15 | type_ref::TypeRef, | 14 | type_ref::TypeRef, |
16 | AssocContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId, VariantId, | 15 | AssocContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId, |
17 | }; | 16 | }; |
18 | use hir_expand::name::{name, Name}; | 17 | use hir_expand::name::{name, Name}; |
19 | 18 | ||
@@ -136,16 +135,6 @@ pub(super) fn associated_type_by_name_including_super_traits( | |||
136 | }) | 135 | }) |
137 | } | 136 | } |
138 | 137 | ||
139 | pub(super) fn variant_data(db: &dyn DefDatabase, var: VariantId) -> Arc<VariantData> { | ||
140 | match var { | ||
141 | VariantId::StructId(it) => db.struct_data(it).variant_data.clone(), | ||
142 | VariantId::UnionId(it) => db.union_data(it).variant_data.clone(), | ||
143 | VariantId::EnumVariantId(it) => { | ||
144 | db.enum_data(it.parent).variants[it.local_id].variant_data.clone() | ||
145 | } | ||
146 | } | ||
147 | } | ||
148 | |||
149 | /// Helper for mutating `Arc<[T]>` (i.e. `Arc::make_mut` for Arc slices). | 138 | /// Helper for mutating `Arc<[T]>` (i.e. `Arc::make_mut` for Arc slices). |
150 | /// The underlying values are cloned if there are other strong references. | 139 | /// The underlying values are cloned if there are other strong references. |
151 | pub(crate) fn make_mut_slice<T: Clone>(a: &mut Arc<[T]>) -> &mut [T] { | 140 | pub(crate) fn make_mut_slice<T: Clone>(a: &mut Arc<[T]>) -> &mut [T] { |