Rollup merge of #136671 - nnethercote:middle-limits, r=Nadrieril

Overhaul `rustc_middle::limits`

In particular, to make `pattern_complexity` work more like other limits, which then enables some other simplifications.

r? ``@Nadrieril``
This commit is contained in:
Matthias Krüger 2025-02-17 06:37:35 +01:00 committed by GitHub
commit cec1c9f382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ impl<'db> MatchCheckCtx<'db> {
let place_validity = PlaceValidity::from_bool(known_valid_scrutinee.unwrap_or(true));
// Measured to take ~100ms on modern hardware.
let complexity_limit = Some(500000);
let complexity_limit = 500000;
compute_match_usefulness(self, arms, scrut_ty, place_validity, complexity_limit)
}

View File

@ -9107,8 +9107,8 @@ The tracking issue for this feature is: [#27721]
deny_since: None,
},
Lint {
label: "pattern_complexity",
description: r##"# `pattern_complexity`
label: "pattern_complexity_limit",
description: r##"# `pattern_complexity_limit`
This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.