diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-07 15:19:05 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-11 11:34:01 +0000 |
| commit | a13354bea05968799a5be5521691322274fa6a9e (patch) | |
| tree | e8e27ef15e991c493c152623adefa78ec0f64eab /compiler/rustc_ty_utils/src/representability.rs | |
| parent | 7e4077d06fc073442c567d58885b47ed2c5121b8 (diff) | |
| download | rust-a13354bea05968799a5be5521691322274fa6a9e.tar.gz rust-a13354bea05968799a5be5521691322274fa6a9e.zip | |
rename `BitSet` to `DenseBitSet`
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
Diffstat (limited to 'compiler/rustc_ty_utils/src/representability.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/representability.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/representability.rs b/compiler/rustc_ty_utils/src/representability.rs index 0ffb7f62496..98b1550e1a3 100644 --- a/compiler/rustc_ty_utils/src/representability.rs +++ b/compiler/rustc_ty_utils/src/representability.rs @@ -1,5 +1,5 @@ use rustc_hir::def::DefKind; -use rustc_index::bit_set::BitSet; +use rustc_index::bit_set::DenseBitSet; use rustc_middle::bug; use rustc_middle::query::Providers; use rustc_middle::ty::{self, Representability, Ty, TyCtxt}; @@ -83,10 +83,10 @@ fn representability_adt_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Representab Representability::Representable } -fn params_in_repr(tcx: TyCtxt<'_>, def_id: LocalDefId) -> BitSet<u32> { +fn params_in_repr(tcx: TyCtxt<'_>, def_id: LocalDefId) -> DenseBitSet<u32> { let adt_def = tcx.adt_def(def_id); let generics = tcx.generics_of(def_id); - let mut params_in_repr = BitSet::new_empty(generics.own_params.len()); + let mut params_in_repr = DenseBitSet::new_empty(generics.own_params.len()); for variant in adt_def.variants() { for field in variant.fields.iter() { params_in_repr_ty( @@ -99,7 +99,7 @@ fn params_in_repr(tcx: TyCtxt<'_>, def_id: LocalDefId) -> BitSet<u32> { params_in_repr } -fn params_in_repr_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, params_in_repr: &mut BitSet<u32>) { +fn params_in_repr_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, params_in_repr: &mut DenseBitSet<u32>) { match *ty.kind() { ty::Adt(adt, args) => { let inner_params_in_repr = tcx.params_in_repr(adt.did()); |
