Skip to content

Commit 8710a2e

Browse files
committed
Reformat everything
1 parent fdf5322 commit 8710a2e

File tree

6 files changed

+11
-20
lines changed

6 files changed

+11
-20
lines changed

compiler/rustc_infer/src/traits/engine.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ pub trait TraitEngine<'tcx>: 'tcx {
4747

4848
fn select_all_or_error(&mut self, infcx: &InferCtxt<'_, 'tcx>) -> Vec<FulfillmentError<'tcx>>;
4949

50-
fn select_where_possible(
51-
&mut self,
52-
infcx: &InferCtxt<'_, 'tcx>,
53-
) -> Vec<FulfillmentError<'tcx>>;
50+
fn select_where_possible(&mut self, infcx: &InferCtxt<'_, 'tcx>)
51+
-> Vec<FulfillmentError<'tcx>>;
5452

5553
fn pending_obligations(&self) -> Vec<PredicateObligation<'tcx>>;
5654

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,10 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ParamEnv<'tcx> {
12561256
}
12571257

12581258
impl<'tcx> TypeFoldable<'tcx> for ParamEnv<'tcx> {
1259-
fn super_fold_with<F: ty::fold::TypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
1259+
fn super_fold_with<F: ty::fold::TypeFolder<'tcx>>(
1260+
self,
1261+
folder: &mut F,
1262+
) -> Result<Self, F::Error> {
12601263
Ok(ParamEnv::new(
12611264
self.caller_bounds().fold_with(folder)?,
12621265
self.reveal().fold_with(folder)?,

compiler/rustc_trait_selection/src/traits/select/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,10 +2144,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
21442144
previous_stack: TraitObligationStackList<'o, 'tcx>,
21452145
obligation: &'o TraitObligation<'tcx>,
21462146
) -> TraitObligationStack<'o, 'tcx> {
2147-
let fresh_trait_pred = obligation
2148-
.predicate
2149-
.fold_with(&mut self.freshener)
2150-
.into_ok();
2147+
let fresh_trait_pred = obligation.predicate.fold_with(&mut self.freshener).into_ok();
21512148

21522149
let dfn = previous_stack.cache.next_dfn();
21532150
let depth = previous_stack.depth() + 1;

compiler/rustc_typeck/src/check/compare_method.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,8 +1432,7 @@ pub fn check_type_bounds<'tcx>(
14321432

14331433
// Check that all obligations are satisfied by the implementation's
14341434
// version.
1435-
let errors =
1436-
inh.fulfillment_cx.borrow_mut().select_all_or_error(&infcx);
1435+
let errors = inh.fulfillment_cx.borrow_mut().select_all_or_error(&infcx);
14371436
if !errors.is_empty() {
14381437
infcx.report_fulfillment_errors(&errors, None, false);
14391438
return Err(ErrorReported);

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
610610

611611
#[instrument(skip(self), level = "debug")]
612612
pub(in super::super) fn select_all_obligations_or_error(&self) {
613-
let errors = self
614-
.fulfillment_cx
615-
.borrow_mut()
616-
.select_all_or_error(&self);
613+
let errors = self.fulfillment_cx.borrow_mut().select_all_or_error(&self);
617614

618615
if !errors.is_empty() {
619616
self.report_fulfillment_errors(&errors, self.inh.body_id, false);
@@ -626,10 +623,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
626623
fallback_has_occurred: bool,
627624
mutate_fulfillment_errors: impl Fn(&mut Vec<traits::FulfillmentError<'tcx>>),
628625
) {
629-
let mut result = self
630-
.fulfillment_cx
631-
.borrow_mut()
632-
.select_where_possible(self);
626+
let mut result = self.fulfillment_cx.borrow_mut().select_where_possible(self);
633627
if !result.is_empty() {
634628
mutate_fulfillment_errors(&mut result);
635629
self.report_fulfillment_errors(&result, self.inh.body_id, fallback_has_occurred);

src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ impl const Baz for NonConstAdd {
2828
type Qux = NonConstAdd; // OK
2929
}
3030

31-
fn main() {}
31+
fn main() {}

0 commit comments

Comments
 (0)