From cb622f3994a23d09bb24ef1add67a1569009d558 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Dec 2023 20:15:52 +0100 Subject: Name rustc-specific things "rustc" --- compiler/rustc_pattern_analysis/src/lints.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'compiler/rustc_pattern_analysis/src/lints.rs') diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs index 88967ab9010..89eb439c3f0 100644 --- a/compiler/rustc_pattern_analysis/src/lints.rs +++ b/compiler/rustc_pattern_analysis/src/lints.rs @@ -8,14 +8,13 @@ use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS; use rustc_span::Span; use crate::constructor::{IntRange, MaybeInfiniteInt}; -use crate::cx::{ - Constructor, DeconstructedPat, MatchArm, MatchCheckCtxt, PatCtxt, SplitConstructorSet, - WitnessPat, -}; use crate::errors::{ NonExhaustiveOmittedPattern, NonExhaustiveOmittedPatternLintOnArm, Overlap, OverlappingRangeEndpoints, Uncovered, }; +use crate::rustc::{ + Constructor, DeconstructedPat, MatchArm, PatCtxt, RustcCtxt, SplitConstructorSet, WitnessPat, +}; use crate::MatchCx; /// A column of patterns in the matrix, where a column is the intuitive notion of "subpatterns that @@ -56,10 +55,10 @@ impl<'a, 'p, 'tcx> PatternColumn<'a, 'p, 'tcx> { // If the type is opaque and it is revealed anywhere in the column, we take the revealed // version. Otherwise we could encounter constructors for the revealed type and crash. let first_ty = self.patterns[0].ty(); - if MatchCheckCtxt::is_opaque_ty(first_ty) { + if RustcCtxt::is_opaque_ty(first_ty) { for pat in &self.patterns { let ty = pat.ty(); - if !MatchCheckCtxt::is_opaque_ty(ty) { + if !RustcCtxt::is_opaque_ty(ty) { return Some(ty); } } @@ -126,7 +125,7 @@ impl<'a, 'p, 'tcx> PatternColumn<'a, 'p, 'tcx> { /// in a given column. #[instrument(level = "debug", skip(cx, wildcard_arena), ret)] fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>( - cx: &MatchCheckCtxt<'p, 'tcx>, + cx: &RustcCtxt<'p, 'tcx>, column: &PatternColumn<'a, 'p, 'tcx>, wildcard_arena: &TypedArena>, ) -> Vec> { @@ -174,7 +173,7 @@ fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>( } pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>( - cx: &MatchCheckCtxt<'p, 'tcx>, + cx: &RustcCtxt<'p, 'tcx>, arms: &[MatchArm<'p, 'tcx>], pat_column: &PatternColumn<'a, 'p, 'tcx>, scrut_ty: Ty<'tcx>, @@ -228,7 +227,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>( /// Traverse the patterns to warn the user about ranges that overlap on their endpoints. #[instrument(level = "debug", skip(cx, wildcard_arena))] pub(crate) fn lint_overlapping_range_endpoints<'a, 'p, 'tcx>( - cx: &MatchCheckCtxt<'p, 'tcx>, + cx: &RustcCtxt<'p, 'tcx>, column: &PatternColumn<'a, 'p, 'tcx>, wildcard_arena: &TypedArena>, ) { -- cgit 1.4.1-3-g733a5