beginning of MIR

This commit is contained in:
hkalbasi 2023-02-03 14:46:25 +03:30
parent b881deb66a
commit cd67589f63
41 changed files with 4452 additions and 702 deletions

View file

@ -152,6 +152,15 @@ impl TyBuilder<()> {
TyKind::Tuple(0, Substitution::empty(Interner)).intern(Interner)
}
// FIXME: rustc's ty is dependent on the adt type, maybe we need to do that as well
pub fn discr_ty() -> Ty {
TyKind::Scalar(chalk_ir::Scalar::Int(chalk_ir::IntTy::I128)).intern(Interner)
}
pub fn bool() -> Ty {
TyKind::Scalar(chalk_ir::Scalar::Bool).intern(Interner)
}
pub fn usize() -> Ty {
TyKind::Scalar(chalk_ir::Scalar::Uint(chalk_ir::UintTy::Usize)).intern(Interner)
}