rust/compiler
Matthias Krüger 8c8835d277
Rollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank
Suggest a case insensitive match name regardless of levenshtein distance

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 https://github.com/rust-lang/rust/pull/46347#discussion_r153701834, 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``
2021-10-19 05:40:53 +02:00
..
2021-10-10 15:38:19 +02:00
2021-10-16 13:36:05 -07:00
2021-10-15 01:41:31 +02:00
2021-10-10 15:38:19 +02:00
2021-10-06 19:36:52 +00:00
2021-10-10 15:38:19 +02:00
2021-10-10 15:38:19 +02:00
2021-10-07 11:29:47 -07:00
2021-10-10 15:38:19 +02:00