We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e6d39a commit 6ae2677Copy full SHA for 6ae2677
compiler/rustc_span/src/edit_distance.rs
@@ -238,8 +238,9 @@ fn find_best_match_for_name_impl(
238
}
239
240
fn find_match_by_sorted_words(iter_names: &[Symbol], lookup: &str) -> Option<Symbol> {
241
+ let lookup_sorted_by_words = sort_by_words(lookup);
242
iter_names.iter().fold(None, |result, candidate| {
- if sort_by_words(candidate.as_str()) == sort_by_words(lookup) {
243
+ if sort_by_words(candidate.as_str()) == lookup_sorted_by_words {
244
Some(*candidate)
245
} else {
246
result
0 commit comments