Skip to content

Commit 1523de3

Browse files
committed
rustfmt various files
1 parent 9b1d222 commit 1523de3

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/librustc/infer/canonical/query_result.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ impl<'cx, 'gcx, 'tcx> InferCtxtBuilder<'cx, 'gcx, 'tcx> {
5656
pub fn enter_canonical_trait_query<K, R>(
5757
&'tcx mut self,
5858
canonical_key: &Canonical<'tcx, K>,
59-
op: impl FnOnce(&InferCtxt<'_, 'gcx, 'tcx>, &mut FulfillmentContext<'tcx>, K) -> Fallible<R>,
59+
operation: impl FnOnce(&InferCtxt<'_, 'gcx, 'tcx>, &mut FulfillmentContext<'tcx>, K)
60+
-> Fallible<R>,
6061
) -> Fallible<CanonicalizedQueryResult<'gcx, R>>
6162
where
6263
K: TypeFoldable<'tcx>,
@@ -66,7 +67,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxtBuilder<'cx, 'gcx, 'tcx> {
6667
let (key, canonical_inference_vars) =
6768
infcx.instantiate_canonical_with_fresh_inference_vars(DUMMY_SP, &canonical_key);
6869
let fulfill_cx = &mut FulfillmentContext::new();
69-
let value = op(infcx, fulfill_cx, key)?;
70+
let value = operation(infcx, fulfill_cx, key)?;
7071
infcx.make_canonicalized_query_result(canonical_inference_vars, value, fulfill_cx)
7172
})
7273
}

src/librustc/traits/query/type_op/eq.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ impl<'tcx> Eq<'tcx> {
2727
impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Eq<'tcx> {
2828
type QueryResult = ();
2929

30-
fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Eq<'tcx>>) -> Option<Self::QueryResult> {
30+
fn try_fast_path(
31+
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
32+
key: &ParamEnvAnd<'tcx, Eq<'tcx>>,
33+
) -> Option<Self::QueryResult> {
3134
if key.value.a == key.value.b {
3235
Some(())
3336
} else {

src/librustc/traits/query/type_op/prove_predicate.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ pub struct ProvePredicate<'tcx> {
1919

2020
impl<'tcx> ProvePredicate<'tcx> {
2121
pub fn new(predicate: Predicate<'tcx>) -> Self {
22-
ProvePredicate {
23-
predicate,
24-
}
22+
ProvePredicate { predicate }
2523
}
2624
}
2725

2826
impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx> {
2927
type QueryResult = ();
3028

31-
fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, _key: &ParamEnvAnd<'tcx, Self>) -> Option<Self::QueryResult> {
29+
fn try_fast_path(
30+
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
31+
_key: &ParamEnvAnd<'tcx, Self>,
32+
) -> Option<Self::QueryResult> {
3233
None
3334
}
3435

src/librustc_traits/type_op.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ use rustc::traits::query::type_op::normalize::Normalize;
1515
use rustc::traits::query::type_op::prove_predicate::ProvePredicate;
1616
use rustc::traits::query::type_op::subtype::Subtype;
1717
use rustc::traits::query::{Fallible, NoSolution};
18-
use rustc::traits::{FulfillmentContext, Normalized, Obligation, ObligationCause, TraitEngine, TraitEngineExt};
18+
use rustc::traits::{FulfillmentContext, Normalized, Obligation, ObligationCause, TraitEngine,
19+
TraitEngineExt};
1920
use rustc::ty::query::Providers;
2021
use rustc::ty::{FnSig, Lift, ParamEnvAnd, PolyFnSig, Predicate, Ty, TyCtxt, TypeFoldable};
2122
use rustc_data_structures::sync::Lrc;

0 commit comments

Comments
 (0)