about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-21 19:48:41 +0000
committerbors <bors@rust-lang.org>2023-06-21 19:48:41 +0000
commit065a1f5df9c2f1d93269e4d25a2acabbddb0db8d (patch)
treec1f5dd78a07bd7887bfa69f8a0e0967219e22702 /compiler/rustc_data_structures/src
parent006a26c0b546abc0fbef59a773639582b641e500 (diff)
parentf5470af6a6cac4aed859a072feff62e838f41b37 (diff)
downloadrust-065a1f5df9c2f1d93269e4d25a2acabbddb0db8d.tar.gz
rust-065a1f5df9c2f1d93269e4d25a2acabbddb0db8d.zip
Auto merge of #112900 - GuillaumeGomez:rollup-1blf4io, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #112538 (Removed unnecessary &String -> &str, now that &String implements StableOrd as well)
 - #112868 (Liberate bound vars properly when suggesting missing async-fn-in-trait)
 - #112892 (resolve: Minor cleanup to `fn resolve_path_with_ribs`)
 - #112894 (Fix union fields display)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/unord.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs
index e18c7b415f6..2b21815b687 100644
--- a/compiler/rustc_data_structures/src/unord.rs
+++ b/compiler/rustc_data_structures/src/unord.rs
@@ -107,6 +107,10 @@ impl<T, I: Iterator<Item = T>> UnordItems<T, I> {
     {
         UnordItems(self.0.flat_map(f))
     }
+
+    pub fn collect<C: From<UnordItems<T, I>>>(self) -> C {
+        self.into()
+    }
 }
 
 impl<T> UnordItems<T, std::iter::Empty<T>> {
@@ -161,10 +165,6 @@ impl<T: Ord, I: Iterator<Item = T>> UnordItems<T, I> {
         items.sort_by_cached_key(|x| x.to_stable_hash_key(hcx));
         items
     }
-
-    pub fn collect<C: From<UnordItems<T, I>>>(self) -> C {
-        self.into()
-    }
 }
 
 /// This is a set collection type that tries very hard to not expose