diff options
Diffstat (limited to 'compiler/rustc_ty_utils/src/ty.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/ty.rs | 5 | 
1 files changed, 1 insertions, 4 deletions
| diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index e44f80d5ac3..20ae986ffa4 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -49,10 +49,7 @@ fn sized_constraint_for_ty<'tcx>( // we know that `T` is Sized and do not need to check // it on the impl. - let sized_trait = match tcx.lang_items().sized_trait() { - Some(x) => x, - _ => return vec![ty], - }; + let Some(sized_trait) = tcx.lang_items().sized_trait() else { return vec![ty] }; let sized_predicate = ty::Binder::dummy(ty::TraitRef { def_id: sized_trait, substs: tcx.mk_substs_trait(ty, &[]), | 
