Skip to content

Commit ac5bd5d

Browse files
committed
remove the FxHashSet since it's not helping us in practice
It turns out that we don't have duplicates, just self-cycles.
1 parent 6e0cefe commit ac5bd5d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/librustc_mir/borrow_check/nll/constraint_set.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use rustc::mir::Location;
1212
use rustc::ty::RegionVid;
13-
use rustc_data_structures::fx::FxHashSet;
1413
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
1514

1615
use std::fmt;
@@ -20,7 +19,6 @@ use std::ops::Deref;
2019
#[derive(Clone, Default)]
2120
crate struct ConstraintSet {
2221
constraints: IndexVec<ConstraintIndex, OutlivesConstraint>,
23-
seen_constraints: FxHashSet<(RegionVid, RegionVid)>,
2422
}
2523

2624
impl ConstraintSet {
@@ -33,9 +31,7 @@ impl ConstraintSet {
3331
// 'a: 'a is pretty uninteresting
3432
return;
3533
}
36-
if self.seen_constraints.insert(constraint.dedup_key()) {
37-
self.constraints.push(constraint);
38-
}
34+
self.constraints.push(constraint);
3935
}
4036

4137
/// Once all constraints have been added, `link()` is used to thread together the constraints
@@ -107,12 +103,6 @@ pub struct OutlivesConstraint {
107103
pub span: Span,
108104
}
109105

110-
impl OutlivesConstraint {
111-
pub fn dedup_key(&self) -> (RegionVid, RegionVid) {
112-
(self.sup, self.sub)
113-
}
114-
}
115-
116106
impl fmt::Debug for OutlivesConstraint {
117107
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
118108
write!(

0 commit comments

Comments
 (0)