mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
infer: remove record_field_resolutions
field
It stores no useful data, since we can derive all fields from `variant_resolutions`
This commit is contained in:
parent
74711deb72
commit
e9752308bb
8 changed files with 35 additions and 40 deletions
|
@ -4,7 +4,6 @@ use std::sync::Arc;
|
|||
|
||||
use chalk_ir::{BoundVar, DebruijnIndex};
|
||||
use hir_def::{
|
||||
adt::VariantData,
|
||||
db::DefDatabase,
|
||||
generics::{
|
||||
GenericParams, TypeParamData, TypeParamProvenance, WherePredicate, WherePredicateTypeTarget,
|
||||
|
@ -13,7 +12,7 @@ use hir_def::{
|
|||
path::Path,
|
||||
resolver::{HasResolver, TypeNs},
|
||||
type_ref::TypeRef,
|
||||
AssocContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId, VariantId,
|
||||
AssocContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId,
|
||||
};
|
||||
use hir_expand::name::{name, Name};
|
||||
|
||||
|
@ -136,16 +135,6 @@ pub(super) fn associated_type_by_name_including_super_traits(
|
|||
})
|
||||
}
|
||||
|
||||
pub(super) fn variant_data(db: &dyn DefDatabase, var: VariantId) -> Arc<VariantData> {
|
||||
match var {
|
||||
VariantId::StructId(it) => db.struct_data(it).variant_data.clone(),
|
||||
VariantId::UnionId(it) => db.union_data(it).variant_data.clone(),
|
||||
VariantId::EnumVariantId(it) => {
|
||||
db.enum_data(it.parent).variants[it.local_id].variant_data.clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper for mutating `Arc<[T]>` (i.e. `Arc::make_mut` for Arc slices).
|
||||
/// The underlying values are cloned if there are other strong references.
|
||||
pub(crate) fn make_mut_slice<T: Clone>(a: &mut Arc<[T]>) -> &mut [T] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue