Rename RustcMatchCheckCtxt -> RustcPatCtxt
This commit is contained in:
@@ -4,15 +4,15 @@ use rustc_span::ErrorGuaranteed;
|
||||
use crate::constructor::Constructor;
|
||||
use crate::errors::{NonExhaustiveOmittedPattern, NonExhaustiveOmittedPatternLintOnArm, Uncovered};
|
||||
use crate::pat_column::PatternColumn;
|
||||
use crate::rustc::{RevealedTy, RustcMatchCheckCtxt, WitnessPat};
|
||||
use crate::rustc::{RevealedTy, RustcPatCtxt, WitnessPat};
|
||||
use crate::MatchArm;
|
||||
|
||||
/// Traverse the patterns to collect any variants of a non_exhaustive enum that fail to be mentioned
|
||||
/// in a given column.
|
||||
#[instrument(level = "debug", skip(cx), ret)]
|
||||
fn collect_nonexhaustive_missing_variants<'p, 'tcx>(
|
||||
cx: &RustcMatchCheckCtxt<'p, 'tcx>,
|
||||
column: &PatternColumn<'p, RustcMatchCheckCtxt<'p, 'tcx>>,
|
||||
cx: &RustcPatCtxt<'p, 'tcx>,
|
||||
column: &PatternColumn<'p, RustcPatCtxt<'p, 'tcx>>,
|
||||
) -> Result<Vec<WitnessPat<'p, 'tcx>>, ErrorGuaranteed> {
|
||||
let Some(&ty) = column.head_ty() else {
|
||||
return Ok(Vec::new());
|
||||
@@ -57,9 +57,9 @@ fn collect_nonexhaustive_missing_variants<'p, 'tcx>(
|
||||
}
|
||||
|
||||
pub(crate) fn lint_nonexhaustive_missing_variants<'p, 'tcx>(
|
||||
rcx: &RustcMatchCheckCtxt<'p, 'tcx>,
|
||||
arms: &[MatchArm<'p, RustcMatchCheckCtxt<'p, 'tcx>>],
|
||||
pat_column: &PatternColumn<'p, RustcMatchCheckCtxt<'p, 'tcx>>,
|
||||
rcx: &RustcPatCtxt<'p, 'tcx>,
|
||||
arms: &[MatchArm<'p, RustcPatCtxt<'p, 'tcx>>],
|
||||
pat_column: &PatternColumn<'p, RustcPatCtxt<'p, 'tcx>>,
|
||||
scrut_ty: RevealedTy<'tcx>,
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
if !matches!(
|
||||
|
||||
Reference in New Issue
Block a user