Skip to content

Commit ec0ad09

Browse files
committed
use a BTreeSet for a more stable error message order
1 parent 3805ebe commit ec0ad09

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustc_typeck/astconv.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ use rustc::ty::{self, Ty, TyCtxt, ToPredicate, TypeFoldable};
2525
use rustc::ty::{GenericParamDef, GenericParamDefKind};
2626
use rustc::ty::wf::object_region_bounds;
2727
use rustc_target::spec::abi;
28+
use std::collections::BTreeSet;
2829
use std::slice;
2930
use require_c_abi_if_variadic;
3031
use util::common::ErrorReported;
31-
use util::nodemap::{FxHashSet, FxHashMap};
32+
use util::nodemap::FxHashMap;
3233
use errors::{FatalError, DiagnosticId};
3334
use lint;
3435

@@ -996,7 +997,9 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
996997
return tcx.types.err;
997998
}
998999

999-
let mut associated_types = FxHashSet::default();
1000+
// use a btreeset to keep output in a more consistent order
1001+
let mut associated_types = BTreeSet::default();
1002+
10001003
for tr in traits::supertraits(tcx, principal) {
10011004
associated_types.extend(tcx.associated_items(tr.def_id())
10021005
.filter(|item| item.kind == ty::AssociatedKind::Type)

0 commit comments

Comments
 (0)