Skip to content

Commit f7ed6e1

Browse files
committed
Make an assert debug-only in find_constraint_paths_between_regions.
This reduces instruction counts for NLL builds of `wg-grammar` by over 20%.
1 parent 8ae730a commit f7ed6e1

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_mir/borrow_check/nll/region_infer/error_reporting

1 file changed

+1
-1
lines changed

Diff for: src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
205205
for constraint in self.constraint_graph
206206
.outgoing_edges(r, &self.constraints, fr_static)
207207
{
208-
assert_eq!(constraint.sup, r);
208+
debug_assert_eq!(constraint.sup, r);
209209
let sub_region = constraint.sub;
210210
if let Trace::NotVisited = context[sub_region] {
211211
context[sub_region] = Trace::FromOutlivesConstraint(constraint);

0 commit comments

Comments
 (0)