add str, slice, and array to smir types
This commit is contained in:
parent
7bd81ee190
commit
fd5553ffea
2 changed files with 8 additions and 3 deletions
|
@ -114,9 +114,11 @@ impl<'tcx> Tables<'tcx> {
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
ty::Foreign(_) => todo!(),
|
ty::Foreign(_) => todo!(),
|
||||||
ty::Str => todo!(),
|
ty::Str => TyKind::RigidTy(RigidTy::Str),
|
||||||
ty::Array(_, _) => todo!(),
|
ty::Array(ty, constant) => {
|
||||||
ty::Slice(_) => todo!(),
|
TyKind::RigidTy(RigidTy::Array(self.intern_ty(*ty), opaque(constant)))
|
||||||
|
}
|
||||||
|
ty::Slice(ty) => TyKind::RigidTy(RigidTy::Slice(self.intern_ty(*ty))),
|
||||||
ty::RawPtr(_) => todo!(),
|
ty::RawPtr(_) => todo!(),
|
||||||
ty::Ref(_, _, _) => todo!(),
|
ty::Ref(_, _, _) => todo!(),
|
||||||
ty::FnDef(_, _) => todo!(),
|
ty::FnDef(_, _) => todo!(),
|
||||||
|
|
|
@ -26,6 +26,9 @@ pub enum RigidTy {
|
||||||
Uint(UintTy),
|
Uint(UintTy),
|
||||||
Float(FloatTy),
|
Float(FloatTy),
|
||||||
Adt(AdtDef, AdtSubsts),
|
Adt(AdtDef, AdtSubsts),
|
||||||
|
Str,
|
||||||
|
Array(Ty, Const),
|
||||||
|
Slice(Ty),
|
||||||
Tuple(Vec<Ty>),
|
Tuple(Vec<Ty>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue