about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/lib.rs
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2023-12-11 20:15:52 +0100
committerNadrieril <nadrieril+git@gmail.com>2023-12-15 16:58:37 +0100
commitcb622f3994a23d09bb24ef1add67a1569009d558 (patch)
tree71b35f5dcb0d6d1864c9a607ca8f864e0a8fafe4 /compiler/rustc_pattern_analysis/src/lib.rs
parent3d7c4df3260f80593c70f901029d696520234b64 (diff)
downloadrust-cb622f3994a23d09bb24ef1add67a1569009d558.tar.gz
rust-cb622f3994a23d09bb24ef1add67a1569009d558.zip
Name rustc-specific things "rustc"
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lib.rs')
-rw-r--r--compiler/rustc_pattern_analysis/src/lib.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs
index 79c8eb394ad..192f35c6abf 100644
--- a/compiler/rustc_pattern_analysis/src/lib.rs
+++ b/compiler/rustc_pattern_analysis/src/lib.rs
@@ -1,10 +1,10 @@
 //! Analysis of patterns, notably match exhaustiveness checking.
 
 pub mod constructor;
-pub mod cx;
 pub mod errors;
 pub(crate) mod lints;
 pub mod pat;
+pub mod rustc;
 pub mod usefulness;
 
 #[macro_use]
@@ -21,11 +21,11 @@ use lints::PatternColumn;
 use rustc_hir::HirId;
 use rustc_index::Idx;
 use rustc_middle::ty::Ty;
-use usefulness::{compute_match_usefulness, UsefulnessReport, ValidityConstraint};
+use usefulness::{compute_match_usefulness, ValidityConstraint};
 
-use crate::cx::MatchCheckCtxt;
 use crate::lints::{lint_nonexhaustive_missing_variants, lint_overlapping_range_endpoints};
 use crate::pat::DeconstructedPat;
+use crate::rustc::RustcCtxt;
 
 pub trait MatchCx: Sized + Clone + fmt::Debug {
     type Ty: Copy + Clone + fmt::Debug; // FIXME: remove Copy
@@ -69,10 +69,10 @@ impl<'p, Cx: MatchCx> Copy for MatchArm<'p, Cx> {}
 /// The entrypoint for this crate. Computes whether a match is exhaustive and which of its arms are
 /// useful, and runs some lints.
 pub fn analyze_match<'p, 'tcx>(
-    cx: &MatchCheckCtxt<'p, 'tcx>,
-    arms: &[MatchArm<'p, MatchCheckCtxt<'p, 'tcx>>],
+    cx: &RustcCtxt<'p, 'tcx>,
+    arms: &[rustc::MatchArm<'p, 'tcx>],
     scrut_ty: Ty<'tcx>,
-) -> UsefulnessReport<'p, MatchCheckCtxt<'p, 'tcx>> {
+) -> rustc::UsefulnessReport<'p, 'tcx> {
     // Arena to store the extra wildcards we construct during analysis.
     let wildcard_arena = cx.pattern_arena;
     let pat_column = PatternColumn::new(arms);