Skip to content

rustdoc: use btree map for where clauses #33373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/librustdoc/clean/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,7 +39,7 @@ use core::DocContext;

pub fn where_clauses(cx: &DocContext, clauses: Vec<WP>) -> Vec<WP> {
// 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();
Expand All @@ -62,7 +62,7 @@ pub fn where_clauses(cx: &DocContext, clauses: Vec<WP>) -> Vec<WP> {
// Simplify the type parameter bounds on all the generics
let mut params = params.into_iter().map(|(k, v)| {
(k, ty_bounds(v))
}).collect::<HashMap<_, _>>();
}).collect::<BTreeMap<_, _>>();

// Look for equality predicates on associated types that can be merged into
// general bound predicates
Expand Down