Skip to content

Commit 486ee57

Browse files
committed
made ./x.py check happy and ran ./x.py test tidy
1 parent 578403a commit 486ee57

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

compiler/rustc_trait_selection/src/traits/coherence.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,17 @@ fn overlap_within_probe<'cx, 'tcx>(
161161
b_def_id: DefId,
162162
snapshot: &CombinedSnapshot<'_, 'tcx>,
163163
) -> Option<OverlapResult<'tcx>> {
164-
fn loose_check<'cx, 'tcx>(selcx: &mut SelectionContext<'cx, 'tcx>, o: &PredicateObligation<'tcx>) -> bool {
164+
fn loose_check<'cx, 'tcx>(
165+
selcx: &mut SelectionContext<'cx, 'tcx>,
166+
o: &PredicateObligation<'tcx>,
167+
) -> bool {
165168
!selcx.predicate_may_hold_fatal(o)
166169
}
167170

168-
fn strict_check<'cx, 'tcx>(selcx: &SelectionContext<'cx, 'tcx>, o: &PredicateObligation<'tcx>) -> bool {
171+
fn strict_check<'cx, 'tcx>(
172+
selcx: &SelectionContext<'cx, 'tcx>,
173+
o: &PredicateObligation<'tcx>,
174+
) -> bool {
169175
let infcx = selcx.infcx();
170176
let tcx = infcx.tcx;
171177
o.flip_polarity(tcx)
@@ -518,7 +524,11 @@ fn orphan_check_trait_ref<'tcx>(
518524
/// - for `Foo<u32>`, where `Foo` is a local type, this returns `[]`.
519525
/// - `&mut u32` returns `[u32]`, as `&mut` is a fundamental type, similar to `Box`.
520526
/// - `Box<Foo<u32>>` returns `[]`, as `Box` is a fundamental type and `Foo` is local.
521-
fn contained_non_local_types<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, in_crate: InCrate) -> Vec<Ty<'tcx>> {
527+
fn contained_non_local_types<'tcx>(
528+
tcx: TyCtxt<'tcx>,
529+
ty: Ty<'tcx>,
530+
in_crate: InCrate,
531+
) -> Vec<Ty<'tcx>> {
522532
if ty_is_local_constructor(ty, in_crate) {
523533
Vec::new()
524534
} else {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ trait InferCtxtPrivExt<'hir, 'tcx> {
11731173
) -> bool;
11741174
}
11751175

1176-
impl<'a, 'tcx> InferCtxtPrivExt<'a,'tcx> for InferCtxt<'a, 'tcx> {
1176+
impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
11771177
// returns if `cond` not occurring implies that `error` does not occur - i.e., that
11781178
// `error` occurring implies that `cond` occurs.
11791179
fn error_implies(&self, cond: ty::Predicate<'tcx>, error: ty::Predicate<'tcx>) -> bool {

compiler/rustc_trait_selection/src/traits/structural_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct Search<'a, 'tcx> {
119119
seen: FxHashSet<hir::def_id::DefId>,
120120
}
121121

122-
impl<'a,'tcx> Search<'a, 'tcx> {
122+
impl<'a, 'tcx> Search<'a, 'tcx> {
123123
fn tcx(&self) -> TyCtxt<'tcx> {
124124
self.infcx.tcx
125125
}

compiler/rustc_trait_selection/src/traits/util.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,10 @@ pub fn upcast_choices<'tcx>(
291291
/// Given a trait `trait_ref`, returns the number of vtable entries
292292
/// that come from `trait_ref`, excluding its supertraits. Used in
293293
/// computing the vtable base for an upcast trait of a trait object.
294-
pub fn count_own_vtable_entries<'tcx>(tcx: TyCtxt<'tcx>, trait_ref: ty::PolyTraitRef<'tcx>) -> usize {
294+
pub fn count_own_vtable_entries<'tcx>(
295+
tcx: TyCtxt<'tcx>,
296+
trait_ref: ty::PolyTraitRef<'tcx>,
297+
) -> usize {
295298
let existential_trait_ref =
296299
trait_ref.map_bound(|trait_ref| ty::ExistentialTraitRef::erase_self_ty(tcx, trait_ref));
297300
let existential_trait_ref = tcx.erase_regions(existential_trait_ref);

0 commit comments

Comments
 (0)