diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:18:21 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:58:38 +0100 |
| commit | 1e89a38423ee1b562e3b10278d0097d88bc48f5f (patch) | |
| tree | 4f9a1a59238d7c5b80020844b430bab6b6eb4de8 /compiler/rustc_pattern_analysis/src/rustc.rs | |
| parent | 8c5e89907c1f6312c8613b5d6851381bbcde8052 (diff) | |
| download | rust-1e89a38423ee1b562e3b10278d0097d88bc48f5f.tar.gz rust-1e89a38423ee1b562e3b10278d0097d88bc48f5f.zip | |
`pattern_analysis` doesn't need to know what spans are
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/rustc.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs index 1d08d2efef3..e5347ce6363 100644 --- a/compiler/rustc_pattern_analysis/src/rustc.rs +++ b/compiler/rustc_pattern_analysis/src/rustc.rs @@ -35,7 +35,7 @@ pub(crate) type PatCtxt<'a, 'p, 'tcx> = crate::usefulness::PatCtxt<'a, 'p, RustcMatchCheckCtxt<'p, 'tcx>>; pub(crate) type SplitConstructorSet<'p, 'tcx> = crate::constructor::SplitConstructorSet<RustcMatchCheckCtxt<'p, 'tcx>>; -pub type Usefulness = crate::usefulness::Usefulness<Span>; +pub type Usefulness<'p, 'tcx> = crate::usefulness::Usefulness<'p, RustcMatchCheckCtxt<'p, 'tcx>>; pub type UsefulnessReport<'p, 'tcx> = crate::usefulness::UsefulnessReport<'p, RustcMatchCheckCtxt<'p, 'tcx>>; pub type WitnessPat<'p, 'tcx> = crate::pat::WitnessPat<RustcMatchCheckCtxt<'p, 'tcx>>; @@ -864,10 +864,10 @@ impl<'p, 'tcx> RustcMatchCheckCtxt<'p, 'tcx> { impl<'p, 'tcx> MatchCx for RustcMatchCheckCtxt<'p, 'tcx> { type Ty = Ty<'tcx>; - type Span = Span; type VariantIdx = VariantIdx; type StrLit = Const<'tcx>; type ArmData = HirId; + type PatData = Span; fn is_exhaustive_patterns_feature_on(&self) -> bool { self.tcx.features().exhaustive_patterns |
