Skip to content

Commit b08d697

Browse files
Formatting fixes
1 parent 042d855 commit b08d697

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/librustc_typeck/check/dropck.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ pub fn check_drop_impl(tcx: TyCtxt<'_>, drop_impl_did: DefId) -> Result<(), Erro
5656
// already checked by coherence, but compilation may
5757
// not have been terminated.
5858
let span = tcx.def_span(drop_impl_did);
59-
tcx.sess.delay_span_bug(span,
60-
&format!("should have been rejected by coherence check: {}", dtor_self_type));
59+
tcx.sess.delay_span_bug(
60+
span,
61+
&format!("should have been rejected by coherence check: {}", dtor_self_type),
62+
);
6163
Err(ErrorReported)
6264
}
6365
}
@@ -85,10 +87,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
8587
let fresh_impl_self_ty = drop_impl_ty.subst(tcx, fresh_impl_substs);
8688

8789
let cause = &ObligationCause::misc(drop_impl_span, drop_impl_hir_id);
88-
match infcx
89-
.at(cause, impl_param_env)
90-
.eq(named_type, fresh_impl_self_ty)
91-
{
90+
match infcx.at(cause, impl_param_env).eq(named_type, fresh_impl_self_ty) {
9291
Ok(InferOk { obligations, .. }) => {
9392
fulfillment_cx.register_predicate_obligations(infcx, obligations);
9493
}
@@ -99,12 +98,13 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
9998
drop_impl_span,
10099
E0366,
101100
"Implementations of Drop cannot be specialized"
102-
).span_note(
101+
)
102+
.span_note(
103103
item_span,
104104
"Use same sequence of generic type and region \
105105
parameters that is on the struct/enum definition",
106106
)
107-
.emit();
107+
.emit();
108108
return Err(ErrorReported);
109109
}
110110
}
@@ -245,12 +245,13 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
245245
E0367,
246246
"The requirement `{}` is added only by the Drop impl.",
247247
predicate
248-
).span_note(
248+
)
249+
.span_note(
249250
item_span,
250251
"The same requirement must be part of \
251252
the struct/enum definition",
252253
)
253-
.emit();
254+
.emit();
254255
result = Err(ErrorReported);
255256
}
256257
}

0 commit comments

Comments
 (0)