about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/ty.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-02-02 13:57:36 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-04-08 12:02:19 +0000
commit84acfe86dec370028987c205e7ba32cc5796d9b0 (patch)
treeff88b90d1afc4d94167449b71731a3a61b31bb1f /compiler/rustc_ty_utils/src/ty.rs
parent6b24a9cf70032429b6a3730c89db2c8cc6de9314 (diff)
downloadrust-84acfe86dec370028987c205e7ba32cc5796d9b0.tar.gz
rust-84acfe86dec370028987c205e7ba32cc5796d9b0.zip
Actually create ranged int types in the type system.
Diffstat (limited to 'compiler/rustc_ty_utils/src/ty.rs')
-rw-r--r--compiler/rustc_ty_utils/src/ty.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs
index 547a3cb5a8c..f33234122c9 100644
--- a/compiler/rustc_ty_utils/src/ty.rs
+++ b/compiler/rustc_ty_utils/src/ty.rs
@@ -36,6 +36,8 @@ fn sized_constraint_for_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'
         // these are never sized
         Str | Slice(..) | Dynamic(_, _, ty::Dyn) | Foreign(..) => Some(ty),
 
+        Pat(ty, _) => sized_constraint_for_ty(tcx, *ty),
+
         Tuple(tys) => tys.last().and_then(|&ty| sized_constraint_for_ty(tcx, ty)),
 
         // recursive case