6

Suggest a case insensitive match name regardless of levenshtein distance by John...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/89956
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Member

JohnTitor commented 12 days ago

Fixes #86170

Currently, find_best_match_for_name only returns a case insensitive match name depending on a Levenshtein distance. It's a bit unfortunate that that hides some suggestions for typos like Bar -> BAR. That idea is from #46347 (comment), but I think it still makes some sense to show a candidate when we find a case insensitive match name as it's more like a typo.
Skipped the candidate != lookup check because the current (i.e, levenshtein_match) returns the exact same Symbol anyway but it doesn't seem to confuse anything on UI tests.

r? @estebank


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK