Skip to content

Commit 05b6644

Browse files
committed
obligations.rs: rustfmt
1 parent c1114e9 commit 05b6644

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/librustc/infer/outlives/obligations.rs

+11-7
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
133133
param_env: ty::ParamEnv<'tcx>,
134134
body_id: ast::NodeId,
135135
) {
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+
);
137140

138141
// pull out the region obligations with the given `body_id` (leaving the rest)
139142
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> {
182185
/// them. This function should not really exist; it is used to
183186
/// accommodate some older code for the time being.
184187
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+
);
186192

187193
self.region_obligations.borrow_mut().clear();
188194
}
@@ -496,10 +502,7 @@ impl<'cx, 'gcx, 'tcx> TypeOutlives<'cx, 'gcx, 'tcx> {
496502
// dubious for projections, but it will work for simple cases
497503
// like `T` and `T::Item`. It may not work as well for things
498504
// 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);
503506

504507
// Next, collect regions we scraped from the well-formedness
505508
// constraints in the fn signature. To do that, we walk the list
@@ -588,7 +591,8 @@ impl<'cx, 'gcx, 'tcx> TypeOutlives<'cx, 'gcx, 'tcx> {
588591
let identity_proj = tcx.mk_projection(assoc_item_def_id, identity_substs);
589592
self.collect_outlives_from_predicate_list(
590593
identity_proj,
591-
traits::elaborate_predicates(tcx, trait_predicates.predicates))
594+
traits::elaborate_predicates(tcx, trait_predicates.predicates),
595+
)
592596
}
593597

594598
/// Searches through a predicate list for a predicate `T: 'a`.

0 commit comments

Comments
 (0)