Skip to content

Commit

Permalink
add reasons of using BTreeMap to a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cengiz-io committed Nov 12, 2017
1 parent 090669d commit 5aac7a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc/infer/region_inference/mod.rs
Expand Up @@ -187,6 +187,12 @@ pub struct RegionVarBindings<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
/// Constraints of the form `A <= B` introduced by the region
/// checker. Here at least one of `A` and `B` must be a region
/// variable.
///
/// Using `BTreeMap` because the order in which we iterate over
/// these constraints can affect the way we build the region graph,
/// which in turn affects the way that region errors are reported,
/// leading to small variations in error output across runs and
/// platforms.
constraints: RefCell<BTreeMap<Constraint<'tcx>, SubregionOrigin<'tcx>>>,

/// A "verify" is something that we need to verify after inference is
Expand Down

0 comments on commit 5aac7a5

Please sign in to comment.