diff options
| author | bors <bors@rust-lang.org> | 2024-03-14 04:54:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-14 04:54:37 +0000 |
| commit | 6f3eb1ce3d50246b2cbc5de3107c0f34889f5cc6 (patch) | |
| tree | 24622db216461eee386a0bbb8f8a770df871dda4 /compiler/rustc_pattern_analysis/src/lints.rs | |
| parent | 5ac0b2d0219de2fd6fef86c69ef0cfa1e6c36f3b (diff) | |
| parent | c52ce4eabba65fcc47ce92c20c3e7e6dd73f77df (diff) | |
| download | rust-6f3eb1ce3d50246b2cbc5de3107c0f34889f5cc6.tar.gz rust-6f3eb1ce3d50246b2cbc5de3107c0f34889f5cc6.zip | |
Auto merge of #122454 - matthiaskrgr:rollup-xbmufdc, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #122422 (compiletest: Allow `only-unix` in test headers) - #122424 (fix: typos) - #122425 (Increase timeout for new bors bot) - #122426 (Fix StableMIR `WrappingRange::is_full` computation) - #122429 (Add Exploit Mitigations PG to triagebot.toml) - #122430 (Generate link to `Local` in `hir::Let` documentation) - #122434 (pattern analysis: rename a few types) - #122437 (pattern analysis: remove `MaybeInfiniteInt::JustAfterMax`) - #122438 (Safe Transmute: Require that source referent is smaller than destination) - #122442 (extend docs of -Zprint-mono-items) - #122449 (Delay a bug for stranded opaques) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lints.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lints.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs index 072a8e4bfe5..3ca5ebdb0dd 100644 --- a/compiler/rustc_pattern_analysis/src/lints.rs +++ b/compiler/rustc_pattern_analysis/src/lints.rs @@ -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!( |
