about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2024-03-18 22:28:29 +0100
committerLukas Markeffsky <@>2024-03-18 22:28:29 +0100
commit99efae342e8581d12f9017affba2a229a2cfa152 (patch)
treeeda41541756992ca6db4a3457fad478d527b4ad4 /compiler/rustc_ty_utils/src
parentee66acbea856f12694ea7c8033769a371a754ae3 (diff)
address nits
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-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),