diff --git a/src/librustdoc/clean/simplify.rs b/src/librustdoc/clean/simplify.rs index 4ba412cdc85..c0faa04323e 100644 --- a/src/librustdoc/clean/simplify.rs +++ b/src/librustdoc/clean/simplify.rs @@ -27,7 +27,7 @@ //! bounds by special casing scenarios such as these. Fun! use std::mem; -use std::collections::HashMap; +use std::collections::BTreeMap; use rustc::hir::def_id::DefId; use rustc::ty::subst; @@ -39,7 +39,7 @@ use core::DocContext; pub fn where_clauses(cx: &DocContext, clauses: Vec) -> Vec { // First, partition the where clause into its separate components - let mut params = HashMap::new(); + let mut params = BTreeMap::new(); let mut lifetimes = Vec::new(); let mut equalities = Vec::new(); let mut tybounds = Vec::new(); @@ -62,7 +62,7 @@ pub fn where_clauses(cx: &DocContext, clauses: Vec) -> Vec { // Simplify the type parameter bounds on all the generics let mut params = params.into_iter().map(|(k, v)| { (k, ty_bounds(v)) - }).collect::>(); + }).collect::>(); // Look for equality predicates on associated types that can be merged into // general bound predicates