diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-07-01 05:51:33 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-07-01 05:53:35 -0400 |
| commit | ac5bd5dd2b4abd8eb888f14ea01b59028173c0db (patch) | |
| tree | 66e2fb718e4fea334ea99c4cd778e9eff24a008f | |
| parent | 6e0cefe3dbbfa981063028078aba94ada0dcb066 (diff) | |
| download | rust-ac5bd5dd2b4abd8eb888f14ea01b59028173c0db.tar.gz rust-ac5bd5dd2b4abd8eb888f14ea01b59028173c0db.zip | |
remove the FxHashSet since it's not helping us in practice
It turns out that we don't have duplicates, just self-cycles.
| -rw-r--r-- | src/librustc_mir/borrow_check/nll/constraint_set.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/librustc_mir/borrow_check/nll/constraint_set.rs b/src/librustc_mir/borrow_check/nll/constraint_set.rs index 78bd4504443..4c6e445293d 100644 --- a/src/librustc_mir/borrow_check/nll/constraint_set.rs +++ b/src/librustc_mir/borrow_check/nll/constraint_set.rs @@ -10,7 +10,6 @@ use rustc::mir::Location; use rustc::ty::RegionVid; -use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use std::fmt; @@ -20,7 +19,6 @@ use std::ops::Deref; #[derive(Clone, Default)] crate struct ConstraintSet { constraints: IndexVec<ConstraintIndex, OutlivesConstraint>, - seen_constraints: FxHashSet<(RegionVid, RegionVid)>, } impl ConstraintSet { @@ -33,9 +31,7 @@ impl ConstraintSet { // 'a: 'a is pretty uninteresting return; } - if self.seen_constraints.insert(constraint.dedup_key()) { - self.constraints.push(constraint); - } + self.constraints.push(constraint); } /// Once all constraints have been added, `link()` is used to thread together the constraints @@ -107,12 +103,6 @@ pub struct OutlivesConstraint { pub span: Span, } -impl OutlivesConstraint { - pub fn dedup_key(&self) -> (RegionVid, RegionVid) { - (self.sup, self.sub) - } -} - impl fmt::Debug for OutlivesConstraint { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { write!( |
