mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 10:33:34 +00:00
Return FxIndexSet instead of FxHashSet to avoid order errors on different platforms
This commit is contained in:
parent
504d27cb0c
commit
ada7c1f429
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user