Skip to content

Commit 421e6fc

Browse files
committed
rustdoc: use btree map for where clauses
to get more reproducible output. Fixes: rust-lang#32555
1 parent 7d8100a commit 421e6fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/simplify.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
//! bounds by special casing scenarios such as these. Fun!
2828
2929
use std::mem;
30-
use std::collections::HashMap;
30+
use std::collections::BTreeMap;
3131

3232
use rustc::hir::def_id::DefId;
3333
use rustc::ty::subst;
@@ -39,7 +39,7 @@ use core::DocContext;
3939

4040
pub fn where_clauses(cx: &DocContext, clauses: Vec<WP>) -> Vec<WP> {
4141
// First, partition the where clause into its separate components
42-
let mut params = HashMap::new();
42+
let mut params = BTreeMap::new();
4343
let mut lifetimes = Vec::new();
4444
let mut equalities = Vec::new();
4545
let mut tybounds = Vec::new();
@@ -62,7 +62,7 @@ pub fn where_clauses(cx: &DocContext, clauses: Vec<WP>) -> Vec<WP> {
6262
// Simplify the type parameter bounds on all the generics
6363
let mut params = params.into_iter().map(|(k, v)| {
6464
(k, ty_bounds(v))
65-
}).collect::<HashMap<_, _>>();
65+
}).collect::<BTreeMap<_, _>>();
6666

6767
// Look for equality predicates on associated types that can be merged into
6868
// general bound predicates

0 commit comments

Comments
 (0)