Skip to content

Commit 5331d05

Browse files
committed
Auto merge of rust-lang#108312 - michaelwoerister:hash-set-not-hash-stable, 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.
2 parents ea2073a + 09566cc commit 5331d05

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clippy_lints/src/wildcard_imports.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,10 @@ impl LateLintPass<'_> for WildcardImports {
155155
)
156156
};
157157

158-
let imports_string = if used_imports.len() == 1 {
159-
used_imports.iter().next().unwrap().to_string()
158+
let mut imports = used_imports.items().map(ToString::to_string).into_sorted_stable_ord(false);
159+
let imports_string = if imports.len() == 1 {
160+
imports.pop().unwrap()
160161
} else {
161-
let mut imports = used_imports
162-
.iter()
163-
.map(ToString::to_string)
164-
.collect::<Vec<_>>();
165-
imports.sort();
166162
if braced_glob {
167163
imports.join(", ")
168164
} else {

0 commit comments

Comments
 (0)