Skip to content

Commit 0213c87

Browse files
chenyukangUrgau
andauthored
limit the names_possiblilities to less than 3
Co-authored-by: Urgau <[email protected]>
1 parent c367983 commit 0213c87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_lint/src/context/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub(super) fn builtin(
279279

280280
is_feature_cfg |= best_match == sym::feature;
281281
} else {
282-
if !names_possibilities.is_empty() {
282+
if !names_possibilities.is_empty() && names_possibilities.len() <= 3 {
283283
names_possibilities.sort();
284284
for cfg_name in names_possibilities.iter() {
285285
db.span_suggestion(

0 commit comments

Comments
 (0)