Use re-exported Idx and IndexVec in pat_analysis
This commit is contained in:
parent
a3d6efc9bc
commit
3e73272ac7
@ -4,11 +4,10 @@ use std::fmt;
|
|||||||
|
|
||||||
use hir_def::{DefWithBodyId, EnumId, EnumVariantId, HasModule, LocalFieldId, ModuleId, VariantId};
|
use hir_def::{DefWithBodyId, EnumId, EnumVariantId, HasModule, LocalFieldId, ModuleId, VariantId};
|
||||||
use once_cell::unsync::Lazy;
|
use once_cell::unsync::Lazy;
|
||||||
use rustc_index::IndexVec;
|
|
||||||
use rustc_pattern_analysis::{
|
use rustc_pattern_analysis::{
|
||||||
constructor::{Constructor, ConstructorSet, VariantVisibility},
|
constructor::{Constructor, ConstructorSet, VariantVisibility},
|
||||||
usefulness::{compute_match_usefulness, PlaceValidity, UsefulnessReport},
|
usefulness::{compute_match_usefulness, PlaceValidity, UsefulnessReport},
|
||||||
Captures, PatCx, PrivateUninhabitedField,
|
Captures, IndexVec, PatCx, PrivateUninhabitedField,
|
||||||
};
|
};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use stdx::never;
|
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 {
|
fn new(idx: usize) -> Self {
|
||||||
EnumVariantContiguousIndex(idx)
|
EnumVariantContiguousIndex(idx)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user