Rollup merge of #58210 - nnethercote:find_outlives-debug_assert, r=matthewjasper

Make an assert debug-only in `find_constraint_paths_between_regions`.

This reduces instruction counts for NLL builds of `wg-grammar` by over
20%.

r? @nikomatsakis
This commit is contained in:
kennytm 2019-02-07 13:57:47 +08:00 committed by GitHub
commit fab527f5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,7 +205,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
for constraint in self.constraint_graph
.outgoing_edges(r, &self.constraints, fr_static)
{
assert_eq!(constraint.sup, r);
debug_assert_eq!(constraint.sup, r);
let sub_region = constraint.sub;
if let Trace::NotVisited = context[sub_region] {
context[sub_region] = Trace::FromOutlivesConstraint(constraint);