Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/builder.rs')
-rw-r--r--crates/hir_ty/src/builder.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_ty/src/builder.rs b/crates/hir_ty/src/builder.rs
index 5c77c0cdf8..8c47e9ce1c 100644
--- a/crates/hir_ty/src/builder.rs
+++ b/crates/hir_ty/src/builder.rs
@@ -154,6 +154,10 @@ impl TyBuilder<()> {
TyKind::Tuple(0, Substitution::empty(Interner)).intern(Interner)
}
+ pub fn usize() -> Ty {
+ TyKind::Scalar(chalk_ir::Scalar::Uint(chalk_ir::UintTy::Usize)).intern(Interner)
+ }
+
pub fn fn_ptr(sig: CallableSig) -> Ty {
TyKind::Function(sig.to_fn_ptr()).intern(Interner)
}