@@ -133,7 +133,10 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
133
133
param_env : ty:: ParamEnv < ' tcx > ,
134
134
body_id : ast:: NodeId ,
135
135
) {
136
- assert ! ( !self . in_snapshot. get( ) , "cannot process registered region obligations in a snapshot" ) ;
136
+ assert ! (
137
+ !self . in_snapshot. get( ) ,
138
+ "cannot process registered region obligations in a snapshot"
139
+ ) ;
137
140
138
141
// pull out the region obligations with the given `body_id` (leaving the rest)
139
142
let mut my_region_obligations = Vec :: with_capacity ( self . region_obligations . borrow ( ) . len ( ) ) ;
@@ -182,7 +185,10 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
182
185
/// them. This function should not really exist; it is used to
183
186
/// accommodate some older code for the time being.
184
187
pub fn ignore_region_obligations ( & self ) {
185
- assert ! ( !self . in_snapshot. get( ) , "cannot ignore registered region obligations in a snapshot" ) ;
188
+ assert ! (
189
+ !self . in_snapshot. get( ) ,
190
+ "cannot ignore registered region obligations in a snapshot"
191
+ ) ;
186
192
187
193
self . region_obligations . borrow_mut ( ) . clear ( ) ;
188
194
}
@@ -496,10 +502,7 @@ impl<'cx, 'gcx, 'tcx> TypeOutlives<'cx, 'gcx, 'tcx> {
496
502
// dubious for projections, but it will work for simple cases
497
503
// like `T` and `T::Item`. It may not work as well for things
498
504
// like `<T as Foo<'a>>::Item`.
499
- let mut param_bounds =
500
- self . collect_outlives_from_predicate_list (
501
- generic. to_ty ( tcx) ,
502
- self . param_env . caller_bounds ) ;
505
+ let mut param_bounds = self . collect_outlives_from_predicate_list ( generic. to_ty ( tcx) , self . param_env . caller_bounds ) ;
503
506
504
507
// Next, collect regions we scraped from the well-formedness
505
508
// constraints in the fn signature. To do that, we walk the list
@@ -588,7 +591,8 @@ impl<'cx, 'gcx, 'tcx> TypeOutlives<'cx, 'gcx, 'tcx> {
588
591
let identity_proj = tcx. mk_projection ( assoc_item_def_id, identity_substs) ;
589
592
self . collect_outlives_from_predicate_list (
590
593
identity_proj,
591
- traits:: elaborate_predicates ( tcx, trait_predicates. predicates ) )
594
+ traits:: elaborate_predicates ( tcx, trait_predicates. predicates ) ,
595
+ )
592
596
}
593
597
594
598
/// Searches through a predicate list for a predicate `T: 'a`.
0 commit comments