From 232c1f331c8703f6484e29b8da1cec9bb67f443e Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 5 Jan 2020 01:04:18 +0100 Subject: [PATCH] Format code --- src/librustc_typeck/check/wfcheck.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index a6189a346645..b2169413f46e 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -435,23 +435,18 @@ fn check_trait(tcx: TyCtxt<'_>, item: &hir::Item<'_>) { /// /// Assuming the defaults are used, check that all predicates (bounds on the /// assoc type and where clauses on the trait) hold. -fn check_associated_type_defaults( - fcx: &FnCtxt<'_, '_>, - trait_def_id: DefId, -) { +fn check_associated_type_defaults(fcx: &FnCtxt<'_, '_>, trait_def_id: DefId) { let tcx = fcx.tcx; let substs = InternalSubsts::identity_for_item(tcx, trait_def_id); // For all assoc. types with defaults, build a map from // `>::Assoc` to the default type. - let map = tcx.associated_items(trait_def_id) + let map = tcx + .associated_items(trait_def_id) .filter_map(|item| { if item.kind == ty::AssocKind::Type && item.defaultness.has_value() { // `>::Assoc` - let proj = ty::ProjectionTy { - substs, - item_def_id: item.def_id, - }; + let proj = ty::ProjectionTy { substs, item_def_id: item.def_id }; let default_ty = tcx.type_of(item.def_id); debug!("assoc. type default mapping: {} -> {}", proj, default_ty); Some((proj, default_ty))