mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
beginning of MIR
This commit is contained in:
parent
b881deb66a
commit
cd67589f63
41 changed files with 4452 additions and 702 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue