remove the FxHashSet since it's not helping us in practice
It turns out that we don't have duplicates, just self-cycles.
This commit is contained in:
parent
6e0cefe3db
commit
ac5bd5dd2b
1 changed files with 1 additions and 11 deletions
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
use rustc::mir::Location;
|
use rustc::mir::Location;
|
||||||
use rustc::ty::RegionVid;
|
use rustc::ty::RegionVid;
|
||||||
use rustc_data_structures::fx::FxHashSet;
|
|
||||||
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
|
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -20,7 +19,6 @@ use std::ops::Deref;
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
crate struct ConstraintSet {
|
crate struct ConstraintSet {
|
||||||
constraints: IndexVec<ConstraintIndex, OutlivesConstraint>,
|
constraints: IndexVec<ConstraintIndex, OutlivesConstraint>,
|
||||||
seen_constraints: FxHashSet<(RegionVid, RegionVid)>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConstraintSet {
|
impl ConstraintSet {
|
||||||
|
@ -33,9 +31,7 @@ impl ConstraintSet {
|
||||||
// 'a: 'a is pretty uninteresting
|
// 'a: 'a is pretty uninteresting
|
||||||
return;
|
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
|
/// Once all constraints have been added, `link()` is used to thread together the constraints
|
||||||
|
@ -107,12 +103,6 @@ pub struct OutlivesConstraint {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl OutlivesConstraint {
|
|
||||||
pub fn dedup_key(&self) -> (RegionVid, RegionVid) {
|
|
||||||
(self.sup, self.sub)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Debug for OutlivesConstraint {
|
impl fmt::Debug for OutlivesConstraint {
|
||||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(
|
write!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue