Skip to content

Commit

Permalink
Rollup merge of rust-lang#58210 - nnethercote:find_outlives-debug_ass…
Browse files Browse the repository at this point in the history
…ert, 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
  • Loading branch information
kennytm authored Feb 7, 2019
2 parents 26b157b + f7ed6e1 commit fab527f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fab527f

Please sign in to comment.