Use re-exported Idx and IndexVec in pat_analysis

This commit is contained in:
Laurențiu Nicola 2024-07-16 10:41:13 +03:00
parent a3d6efc9bc
commit 3e73272ac7

View File

@ -4,11 +4,10 @@ use std::fmt;
use hir_def::{DefWithBodyId, EnumId, EnumVariantId, HasModule, LocalFieldId, ModuleId, VariantId};
use once_cell::unsync::Lazy;
use rustc_index::IndexVec;
use rustc_pattern_analysis::{
constructor::{Constructor, ConstructorSet, VariantVisibility},
usefulness::{compute_match_usefulness, PlaceValidity, UsefulnessReport},
Captures, PatCx, PrivateUninhabitedField,
Captures, IndexVec, PatCx, PrivateUninhabitedField,
};
use smallvec::{smallvec, SmallVec};
use stdx::never;
@ -53,7 +52,7 @@ impl EnumVariantContiguousIndex {
}
}
impl rustc_index::Idx for EnumVariantContiguousIndex {
impl rustc_pattern_analysis::Idx for EnumVariantContiguousIndex {
fn new(idx: usize) -> Self {
EnumVariantContiguousIndex(idx)
}