Skip to content

Commit

Permalink
limit the names_possiblilities to less than 3
Browse files Browse the repository at this point in the history
Co-authored-by: Urgau <[email protected]>
  • Loading branch information
chenyukang and Urgau authored Jan 30, 2024
1 parent c367983 commit 0213c87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/context/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ pub(super) fn builtin(

is_feature_cfg |= best_match == sym::feature;
} else {
if !names_possibilities.is_empty() {
if !names_possibilities.is_empty() && names_possibilities.len() <= 3 {
names_possibilities.sort();
for cfg_name in names_possibilities.iter() {
db.span_suggestion(
Expand Down

0 comments on commit 0213c87

Please sign in to comment.