Skip to content

Commit cec1c9f

Browse files
authored
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``
2 parents 1aac875 + 610f4c4 commit cec1c9f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'db> MatchCheckCtx<'db> {
9595

9696
let place_validity = PlaceValidity::from_bool(known_valid_scrutinee.unwrap_or(true));
9797
// Measured to take ~100ms on modern hardware.
98-
let complexity_limit = Some(500000);
98+
let complexity_limit = 500000;
9999
compute_match_usefulness(self, arms, scrut_ty, place_validity, complexity_limit)
100100
}
101101

crates/ide-db/src/generated/lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9107,8 +9107,8 @@ The tracking issue for this feature is: [#27721]
91079107
deny_since: None,
91089108
},
91099109
Lint {
9110-
label: "pattern_complexity",
9111-
description: r##"# `pattern_complexity`
9110+
label: "pattern_complexity_limit",
9111+
description: r##"# `pattern_complexity_limit`
91129112

91139113
This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
91149114

0 commit comments

Comments
 (0)