about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/lints.rs
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2023-12-14 17:54:11 +0100
committerNadrieril <nadrieril+git@gmail.com>2023-12-15 16:58:38 +0100
commite10b1657758e39668c0fd93c9a0d3f32d0a7c0a7 (patch)
tree3e9752b6a0a71f6bb82f78e36f448e75b6fe8542 /compiler/rustc_pattern_analysis/src/lints.rs
parent63c5b008e12355615a3dfe5b4c83b9a109b2bbc6 (diff)
downloadrust-e10b1657758e39668c0fd93c9a0d3f32d0a7c0a7.tar.gz
rust-e10b1657758e39668c0fd93c9a0d3f32d0a7c0a7.zip
s/RustcCtxt/RustcMatchCheckCtxt/
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lints.rs')
-rw-r--r--compiler/rustc_pattern_analysis/src/lints.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs
index be12c8dbd7d..38108b62d79 100644
--- a/compiler/rustc_pattern_analysis/src/lints.rs
+++ b/compiler/rustc_pattern_analysis/src/lints.rs
@@ -13,7 +13,8 @@ use crate::errors::{
     OverlappingRangeEndpoints, Uncovered,
 };
 use crate::rustc::{
-    Constructor, DeconstructedPat, MatchArm, PatCtxt, RustcCtxt, SplitConstructorSet, WitnessPat,
+    Constructor, DeconstructedPat, MatchArm, PatCtxt, RustcMatchCheckCtxt, SplitConstructorSet,
+    WitnessPat,
 };
 use crate::MatchCx;
 
@@ -55,10 +56,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 RustcCtxt::is_opaque_ty(first_ty) {
+        if RustcMatchCheckCtxt::is_opaque_ty(first_ty) {
             for pat in &self.patterns {
                 let ty = pat.ty();
-                if !RustcCtxt::is_opaque_ty(ty) {
+                if !RustcMatchCheckCtxt::is_opaque_ty(ty) {
                     return Some(ty);
                 }
             }
@@ -125,7 +126,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: &RustcCtxt<'p, 'tcx>,
+    cx: &RustcMatchCheckCtxt<'p, 'tcx>,
     column: &PatternColumn<'a, 'p, 'tcx>,
     wildcard_arena: &TypedArena<DeconstructedPat<'p, 'tcx>>,
 ) -> Vec<WitnessPat<'p, 'tcx>> {
@@ -173,7 +174,7 @@ fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
 }
 
 pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
-    cx: &RustcCtxt<'p, 'tcx>,
+    cx: &RustcMatchCheckCtxt<'p, 'tcx>,
     arms: &[MatchArm<'p, 'tcx>],
     pat_column: &PatternColumn<'a, 'p, 'tcx>,
     scrut_ty: Ty<'tcx>,
@@ -227,7 +228,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: &RustcCtxt<'p, 'tcx>,
+    cx: &RustcMatchCheckCtxt<'p, 'tcx>,
     column: &PatternColumn<'a, 'p, 'tcx>,
     wildcard_arena: &TypedArena<DeconstructedPat<'p, 'tcx>>,
 ) {