about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ty_utils/src/ty.rs')
-rw-r--r--compiler/rustc_ty_utils/src/ty.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs
index cffae62e3f0..547a3cb5a8c 100644
--- a/compiler/rustc_ty_utils/src/ty.rs
+++ b/compiler/rustc_ty_utils/src/ty.rs
@@ -39,13 +39,10 @@ fn sized_constraint_for_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'
         Tuple(tys) => tys.last().and_then(|&ty| sized_constraint_for_ty(tcx, ty)),
 
         // recursive case
-        Adt(adt, args) => {
-            let intermediate = adt.sized_constraint(tcx);
-            intermediate.and_then(|intermediate| {
-                let ty = intermediate.instantiate(tcx, args);
-                sized_constraint_for_ty(tcx, ty)
-            })
-        }
+        Adt(adt, args) => adt.sized_constraint(tcx).and_then(|intermediate| {
+            let ty = intermediate.instantiate(tcx, args);
+            sized_constraint_for_ty(tcx, ty)
+        }),
 
         // these can be sized or unsized
         Param(..) | Alias(..) | Error(_) => Some(ty),