Skip to content

Commit fab527f

Browse files
authored
Rollup merge of rust-lang#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
2 parents 26b157b + f7ed6e1 commit fab527f

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

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)