about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-01-05 01:04:18 +0100
committerJonas Schievink <jonasschievink@gmail.com>2020-02-21 19:42:28 +0100
commit232c1f331c8703f6484e29b8da1cec9bb67f443e (patch)
tree921d4e2c50d9e33fc6bff3b29b5ceb1a8aead9e4 /src
parentec501903994911892bb43c388564326b70b7104b (diff)
downloadrust-232c1f331c8703f6484e29b8da1cec9bb67f443e.tar.gz
rust-232c1f331c8703f6484e29b8da1cec9bb67f443e.zip
Format code
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/wfcheck.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs
index a6189a34664..b2169413f46 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
     // `<Self as Trait<...>>::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() {
                 // `<Self as Trait<...>>::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))