Skip to content

Commit b4993c4

Browse files
committed
Prefer UnordSet over FxHashSet where possible
1 parent e2cf2cb commit b4993c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: compiler/rustc_mir_transform/src/coroutine/by_move_body.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! be a coroutine body that takes all of its upvars by-move, and which we stash
44
//! into the `CoroutineInfo` for all coroutines returned by coroutine-closures.
55
6-
use rustc_data_structures::fx::FxIndexSet;
6+
use rustc_data_structures::unord::UnordSet;
77
use rustc_hir as hir;
88
use rustc_middle::mir::visit::MutVisitor;
99
use rustc_middle::mir::{self, dump_mir, MirPass};
@@ -33,7 +33,7 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
3333
return;
3434
}
3535

36-
let mut by_ref_fields = FxIndexSet::default();
36+
let mut by_ref_fields = UnordSet::default();
3737
let by_move_upvars = Ty::new_tup_from_iter(
3838
tcx,
3939
tcx.closure_captures(coroutine_def_id).iter().enumerate().map(|(idx, capture)| {
@@ -73,7 +73,7 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
7373

7474
struct MakeByMoveBody<'tcx> {
7575
tcx: TyCtxt<'tcx>,
76-
by_ref_fields: FxIndexSet<FieldIdx>,
76+
by_ref_fields: UnordSet<FieldIdx>,
7777
by_move_coroutine_ty: Ty<'tcx>,
7878
}
7979

0 commit comments

Comments
 (0)