Skip to content

Commit

Permalink
Rollup merge of #106008 - uweigand:s390x-lintgroup-order, r=Nilstrieb
Browse files Browse the repository at this point in the history
Sort lint_groups in no_lint_suggestion

The no_lint_suggestion routine passes a vector of lint group names to find_best_match_for_name.  That routine depends on the sort order of its input vector, which matters in case multiple inputs are at the same Levenshtein distance to the target name.

However, no_lint_suggestion currently just passes lint_groups.keys() as input vector - this is sorted in hash value order, which is not guaranteed to be stable, and in fact differs between big- and little-endian host platforms, causing test failures on s390x.

To fix this, always sort the lint groups before using their names as input to find_best_match_for_name.  In doing so, prefer non- deprecated lint group names over deprecated ones, and then use alphabetical order.

Fixes rust-lang/rust#105379
  • Loading branch information
Yuki Okushi committed Dec 21, 2022
2 parents 626a234 + b730a6a commit d8312f9
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit d8312f9

Please sign in to comment.