diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-03 05:03:14 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-03 05:03:14 +0000 |
| commit | 22382ebd5cba2c7144b3755d988733b189253046 (patch) | |
| tree | a47932eb544490ae00cec13f3e61dce16670c102 /compiler/rustc_pattern_analysis/src/constructor.rs | |
| parent | d6334ae4d24d51abb27e2b601efc77be133a6bc3 (diff) | |
| parent | 2d47cd77ac7b41a08f5c2ebc22035ed2f39dc076 (diff) | |
| download | rust-22382ebd5cba2c7144b3755d988733b189253046.tar.gz rust-22382ebd5cba2c7144b3755d988733b189253046.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/constructor.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index 95c5556410d..1c9a9ab0f72 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -155,13 +155,13 @@ use std::iter::once; use smallvec::SmallVec; use rustc_apfloat::ieee::{DoubleS, IeeeFloat, SingleS}; -use rustc_index::bit_set::GrowableBitSet; +use rustc_index::bit_set::{BitSet, GrowableBitSet}; +use rustc_index::IndexVec; use self::Constructor::*; use self::MaybeInfiniteInt::*; use self::SliceKind::*; -use crate::index; use crate::PatCx; /// Whether we have seen a constructor in the column or not. @@ -920,10 +920,7 @@ pub enum ConstructorSet<Cx: PatCx> { Struct { empty: bool }, /// This type has the following list of constructors. If `variants` is empty and /// `non_exhaustive` is false, don't use this; use `NoConstructors` instead. - Variants { - variants: index::IdxContainer<Cx::VariantIdx, VariantVisibility>, - non_exhaustive: bool, - }, + Variants { variants: IndexVec<Cx::VariantIdx, VariantVisibility>, non_exhaustive: bool }, /// The type is `&T`. Ref, /// The type is a union. @@ -1025,7 +1022,7 @@ impl<Cx: PatCx> ConstructorSet<Cx> { } } ConstructorSet::Variants { variants, non_exhaustive } => { - let mut seen_set = index::IdxSet::new_empty(variants.len()); + let mut seen_set = BitSet::new_empty(variants.len()); for idx in seen.iter().filter_map(|c| c.as_variant()) { seen_set.insert(idx); } |
