diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-02-06 18:02:32 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-02-06 19:05:50 +1100 |
| commit | f7ed6e18160bc8fccf27a73c05f3935c9e8f672e (patch) | |
| tree | b33965167f793384b16fde29f262c2b7e46839ed | |
| parent | 8ae730a442cc8af6a487a137ae9ba78f89edbba6 (diff) | |
Make an assert debug-only in `find_constraint_paths_between_regions`.
This reduces instruction counts for NLL builds of `wg-grammar` by over 20%.
| -rw-r--r-- | src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs b/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs index ec68ddaf3c8..550668a7cee 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/mod.rs @@ -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); |
