about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2020-11-27 18:45:34 -0300
committerSantiago Pastorino <spastorino@gmail.com>2020-11-27 18:45:34 -0300
commitada7c1f4292400ca536ec1d65438e5e024ffac18 (patch)
tree23f9d247db89d8ede136cc7ee121aebbb9f3d671
parent504d27cb0c705a51f437e0e02a19f2e7512fa8ab (diff)
downloadrust-ada7c1f4292400ca536ec1d65438e5e024ffac18.tar.gz
rust-ada7c1f4292400ca536ec1d65438e5e024ffac18.zip
Return FxIndexSet instead of FxHashSet to avoid order errors on different platforms
-rw-r--r--compiler/rustc_infer/src/traits/util.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_infer/src/traits/util.rs b/compiler/rustc_infer/src/traits/util.rs
index e084530d17a..93863ef1d50 100644
--- a/compiler/rustc_infer/src/traits/util.rs
+++ b/compiler/rustc_infer/src/traits/util.rs
@@ -1,7 +1,7 @@
 use smallvec::smallvec;
 
 use crate::traits::{Obligation, ObligationCause, PredicateObligation};
-use rustc_data_structures::fx::FxHashSet;
+use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
 use rustc_middle::ty::outlives::Component;
 use rustc_middle::ty::{self, ToPredicate, TyCtxt, WithConstness};
 use rustc_span::symbol::Ident;
@@ -297,9 +297,9 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
     tcx: TyCtxt<'tcx>,
     bounds: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
     assoc_name: Ident,
-) -> FxHashSet<ty::PolyTraitRef<'tcx>> {
+) -> FxIndexSet<ty::PolyTraitRef<'tcx>> {
     let mut stack: Vec<_> = bounds.collect();
-    let mut trait_refs = FxHashSet::default();
+    let mut trait_refs = FxIndexSet::default();
 
     while let Some(trait_ref) = stack.pop() {
         if trait_refs.insert(trait_ref) {