Skip to content

Commit cc7b4c2

Browse files
committed
Remove assertions adding dep nodes
1 parent 423e679 commit cc7b4c2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/librustc/ty/context.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -2750,8 +2750,14 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
27502750

27512751
pub fn intern_existential_predicates(self, eps: &[ExistentialPredicate<'tcx>])
27522752
-> &'tcx List<ExistentialPredicate<'tcx>> {
2753-
assert!(!eps.is_empty());
2754-
assert!(eps.windows(2).all(|w| w[0].stable_cmp(self, &w[1]) != Ordering::Greater));
2753+
if cfg!(debug_assertions) {
2754+
assert!(!eps.is_empty());
2755+
self.dep_graph.with_ignore(|| {
2756+
assert!(eps.windows(2).all(|w| {
2757+
w[0].stable_cmp(self, &w[1]) != Ordering::Greater
2758+
}));
2759+
});
2760+
}
27552761
self._intern_existential_predicates(eps)
27562762
}
27572763

0 commit comments

Comments
 (0)