@@ -563,7 +563,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
563
563
pub fn select ( & mut self , obligation : & TraitObligation < ' tcx > )
564
564
-> SelectionResult < ' tcx , Selection < ' tcx > > {
565
565
debug ! ( "select({:?})" , obligation) ;
566
- assert ! ( !obligation. predicate. has_escaping_regions( ) ) ;
566
+ debug_assert ! ( !obligation. predicate. has_escaping_regions( ) ) ;
567
567
568
568
let stack = self . push_stack ( TraitObligationStackList :: empty ( ) , obligation) ;
569
569
@@ -662,7 +662,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
662
662
663
663
match obligation. predicate {
664
664
ty:: Predicate :: Trait ( ref t) => {
665
- assert ! ( !t. has_escaping_regions( ) ) ;
665
+ debug_assert ! ( !t. has_escaping_regions( ) ) ;
666
666
let obligation = obligation. with ( t. clone ( ) ) ;
667
667
self . evaluate_trait_predicate_recursively ( previous_stack, obligation)
668
668
}
@@ -1076,7 +1076,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1076
1076
debug ! ( "candidate_from_obligation(cache_fresh_trait_pred={:?}, obligation={:?})" ,
1077
1077
cache_fresh_trait_pred,
1078
1078
stack) ;
1079
- assert ! ( !stack. obligation. predicate. has_escaping_regions( ) ) ;
1079
+ debug_assert ! ( !stack. obligation. predicate. has_escaping_regions( ) ) ;
1080
1080
1081
1081
if let Some ( c) = self . check_candidate_cache ( stack. obligation . param_env ,
1082
1082
& cache_fresh_trait_pred) {
@@ -1586,7 +1586,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1586
1586
snapshot : & infer:: CombinedSnapshot < ' cx , ' tcx > )
1587
1587
-> bool
1588
1588
{
1589
- assert ! ( !skol_trait_ref. has_escaping_regions( ) ) ;
1589
+ debug_assert ! ( !skol_trait_ref. has_escaping_regions( ) ) ;
1590
1590
if self . infcx . at ( & obligation. cause , obligation. param_env )
1591
1591
. sup ( ty:: Binder :: dummy ( skol_trait_ref) , trait_bound) . is_err ( ) {
1592
1592
return false ;
0 commit comments