diff options
| author | kennytm <kennytm@gmail.com> | 2019-02-07 13:57:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-07 13:57:47 +0800 |
| commit | fab527f5bbb54cc2f4ca23b3ba5e36444ecfb42e (patch) | |
| tree | 6aad1eb4bac4ceabfa8fab87b6b72a6abe19e75c | |
| parent | 26b157b23c280c92c056f9018187de1798aba88b (diff) | |
| parent | f7ed6e18160bc8fccf27a73c05f3935c9e8f672e (diff) | |
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
| -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); |
