Rename ValidityConstraint -> PlaceValidity

The old name came from a time where I wanted to reuse it for
differentiating wildcards from bindings. I don't plan to do this
anymore.
This commit is contained in:
Nadrieril 2024-03-13 13:53:18 +01:00
parent 9ce37dc729
commit cb15bf6256
2 changed files with 12 additions and 20 deletions

View file

@ -179,10 +179,10 @@ pub fn analyze_match<'p, 'tcx>(
pattern_complexity_limit: Option<usize>,
) -> Result<rustc::UsefulnessReport<'p, 'tcx>, ErrorGuaranteed> {
use lints::lint_nonexhaustive_missing_variants;
use usefulness::{compute_match_usefulness, ValidityConstraint};
use usefulness::{compute_match_usefulness, PlaceValidity};
let scrut_ty = tycx.reveal_opaque_ty(scrut_ty);
let scrut_validity = ValidityConstraint::from_bool(tycx.known_valid_scrutinee);
let scrut_validity = PlaceValidity::from_bool(tycx.known_valid_scrutinee);
let report =
compute_match_usefulness(tycx, arms, scrut_ty, scrut_validity, pattern_complexity_limit)?;