limit the names_possiblilities to less than 3

Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
This commit is contained in:
Yukang 2024-01-30 10:18:52 +08:00 committed by GitHub
parent c36798357d
commit 0213c87e12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(