Skip to content

Commit

Permalink
Auto merge of rust-lang#108312 - michaelwoerister:hash-set-not-hash-s…
Browse files Browse the repository at this point in the history
…table, r=eholk

Do not implement HashStable for HashSet (MCP 533)

This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](rust-lang/compiler-team#533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order.

The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
  • Loading branch information
bors committed Mar 8, 2023
2 parents ea2073a + 09566cc commit 5331d05
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions clippy_lints/src/wildcard_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,10 @@ impl LateLintPass<'_> for WildcardImports {
)
};

let imports_string = if used_imports.len() == 1 {
used_imports.iter().next().unwrap().to_string()
let mut imports = used_imports.items().map(ToString::to_string).into_sorted_stable_ord(false);
let imports_string = if imports.len() == 1 {
imports.pop().unwrap()
} else {
let mut imports = used_imports
.iter()
.map(ToString::to_string)
.collect::<Vec<_>>();
imports.sort();
if braced_glob {
imports.join(", ")
} else {
Expand Down

0 comments on commit 5331d05

Please sign in to comment.