consider types of const generics

This commit is contained in:
hkalbasi 2022-04-07 05:30:33 +04:30
parent 5ac07a89ef
commit 204a1561b2
6 changed files with 86 additions and 56 deletions

View file

@ -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)
}