Skip to content

Commit ad93b69

Browse files
committed
MIR typeck: refactor to track region constraints
1 parent 37945fe commit ad93b69

File tree

2 files changed

+250
-72
lines changed

2 files changed

+250
-72
lines changed

src/librustc/infer/region_constraints/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,3 +896,11 @@ impl<'a, 'gcx, 'tcx> VerifyBound<'tcx> {
896896
}
897897
}
898898
}
899+
900+
impl<'tcx> RegionConstraintData<'tcx> {
901+
/// True if this region constraint data contains no constraints.
902+
pub fn is_empty(&self) -> bool {
903+
let RegionConstraintData { constraints, verifys, givens } = self;
904+
constraints.is_empty() && verifys.is_empty() && givens.is_empty()
905+
}
906+
}

0 commit comments

Comments
 (0)