@@ -252,7 +252,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
252
252
-> ty:: Region < ' tcx > {
253
253
// Regions that pre-dated the LUB computation stay as they are.
254
254
if !is_var_in_set ( new_vars, r0) {
255
- assert ! ( !r0. is_late_bound( ) ) ;
255
+ debug_assert ! ( !r0. is_late_bound( ) ) ;
256
256
debug ! ( "generalize_region(r0={:?}): not new variable" , r0) ;
257
257
return r0;
258
258
}
@@ -266,7 +266,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
266
266
debug ! ( "generalize_region(r0={:?}): \
267
267
non-new-variables found in {:?}",
268
268
r0, tainted) ;
269
- assert ! ( !r0. is_late_bound( ) ) ;
269
+ debug_assert ! ( !r0. is_late_bound( ) ) ;
270
270
return r0;
271
271
}
272
272
@@ -349,7 +349,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
349
349
r0 : ty:: Region < ' tcx > )
350
350
-> ty:: Region < ' tcx > {
351
351
if !is_var_in_set ( new_vars, r0) {
352
- assert ! ( !r0. is_late_bound( ) ) ;
352
+ debug_assert ! ( !r0. is_late_bound( ) ) ;
353
353
return r0;
354
354
}
355
355
@@ -402,7 +402,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
402
402
return rev_lookup ( infcx, span, a_map, a_r. unwrap ( ) ) ;
403
403
} else if a_r. is_none ( ) && b_r. is_none ( ) {
404
404
// Not related to bound variables from either fn:
405
- assert ! ( !r0. is_late_bound( ) ) ;
405
+ debug_assert ! ( !r0. is_late_bound( ) ) ;
406
406
return r0;
407
407
} else {
408
408
// Other:
@@ -468,7 +468,7 @@ fn fold_regions_in<'a, 'gcx, 'tcx, T, F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
468
468
// we should only be encountering "escaping" late-bound regions here,
469
469
// because the ones at the current level should have been replaced
470
470
// with fresh variables
471
- assert ! ( match * region {
471
+ debug_assert ! ( match * region {
472
472
ty:: ReLateBound ( ..) => false ,
473
473
_ => true
474
474
} ) ;
@@ -746,13 +746,13 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
746
746
// trait checking, and all of the skolemized regions
747
747
// appear inside predicates, which always have
748
748
// binders, so this assert is satisfied.
749
- assert ! ( current_depth > ty:: INNERMOST ) ;
749
+ debug_assert ! ( current_depth > ty:: INNERMOST ) ;
750
750
751
751
// since leak-check passed, this skolemized region
752
752
// should only have incoming edges from variables
753
753
// (which ought not to escape the snapshot, but we
754
754
// don't check that) or itself
755
- assert ! (
755
+ debug_assert ! (
756
756
match * r {
757
757
ty:: ReVar ( _) => true ,
758
758
ty:: ReSkolemized ( _, ref br1) => br == br1,
0 commit comments