diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-19 05:40:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-19 05:40:53 +0200 |
| commit | 8c8835d277e2b462ebf0584b4eb2db93369603a6 (patch) | |
| tree | a70d84c57f93f67b78d5762c025d9bc895ab2e4f /compiler/rustc_mir_transform/src/coverage/counters.rs | |
| parent | 9dccb7bd890e456fe4a1344edd0a8b67c88a901a (diff) | |
| parent | d4cc8774d598dd496a3dee393271c9c69a07e2fa (diff) | |
| download | rust-8c8835d277e2b462ebf0584b4eb2db93369603a6.tar.gz rust-8c8835d277e2b462ebf0584b4eb2db93369603a6.zip | |
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``
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions
