Skip to content

Commit ada7c1f

Browse files
committed
Return FxIndexSet instead of FxHashSet to avoid order errors on different platforms
1 parent 504d27c commit ada7c1f

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_infer/src/traits

1 file changed

+3
-3
lines changed

compiler/rustc_infer/src/traits/util.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use smallvec::smallvec;
22

33
use crate::traits::{Obligation, ObligationCause, PredicateObligation};
4-
use rustc_data_structures::fx::FxHashSet;
4+
use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
55
use rustc_middle::ty::outlives::Component;
66
use rustc_middle::ty::{self, ToPredicate, TyCtxt, WithConstness};
77
use rustc_span::symbol::Ident;
@@ -297,9 +297,9 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
297297
tcx: TyCtxt<'tcx>,
298298
bounds: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
299299
assoc_name: Ident,
300-
) -> FxHashSet<ty::PolyTraitRef<'tcx>> {
300+
) -> FxIndexSet<ty::PolyTraitRef<'tcx>> {
301301
let mut stack: Vec<_> = bounds.collect();
302-
let mut trait_refs = FxHashSet::default();
302+
let mut trait_refs = FxIndexSet::default();
303303

304304
while let Some(trait_ref) = stack.pop() {
305305
if trait_refs.insert(trait_ref) {

0 commit comments

Comments
 (0)