about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-04-02 14:10:06 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-04-02 14:10:06 +0000
commitb4993c47f2f1348356d87c92ea54fd20fcd71cb7 (patch)
tree6996e99fb261d4bbd95edae37d545c6a02a6da1a
parente2cf2cb30388385f0fe6b406a31a3f9841a72a62 (diff)
downloadrust-b4993c47f2f1348356d87c92ea54fd20fcd71cb7.tar.gz
rust-b4993c47f2f1348356d87c92ea54fd20fcd71cb7.zip
Prefer `UnordSet` over `FxHashSet` where possible
-rw-r--r--compiler/rustc_mir_transform/src/coroutine/by_move_body.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
index e0bbd582d88..9201ad40152 100644
--- a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
+++ b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
@@ -3,7 +3,7 @@
 //! be a coroutine body that takes all of its upvars by-move, and which we stash
 //! into the `CoroutineInfo` for all coroutines returned by coroutine-closures.
 
-use rustc_data_structures::fx::FxIndexSet;
+use rustc_data_structures::unord::UnordSet;
 use rustc_hir as hir;
 use rustc_middle::mir::visit::MutVisitor;
 use rustc_middle::mir::{self, dump_mir, MirPass};
@@ -33,7 +33,7 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
             return;
         }
 
-        let mut by_ref_fields = FxIndexSet::default();
+        let mut by_ref_fields = UnordSet::default();
         let by_move_upvars = Ty::new_tup_from_iter(
             tcx,
             tcx.closure_captures(coroutine_def_id).iter().enumerate().map(|(idx, capture)| {
@@ -73,7 +73,7 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
 
 struct MakeByMoveBody<'tcx> {
     tcx: TyCtxt<'tcx>,
-    by_ref_fields: FxIndexSet<FieldIdx>,
+    by_ref_fields: UnordSet<FieldIdx>,
     by_move_coroutine_ty: Ty<'tcx>,
 }