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/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_pattern_analysis/src/lib.rs') 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); -- cgit 1.4.1-3-g733a5