add RawPtr

This commit is contained in:
Eric Mark Martin 2023-07-13 00:23:22 -04:00
parent 285920ea2d
commit 08e89acd2e
2 changed files with 6 additions and 1 deletions

View File

@ -119,7 +119,9 @@ impl<'tcx> Tables<'tcx> {
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(ty::TypeAndMut { ty, mutbl }) => {
TyKind::RigidTy(RigidTy::RawPtr(self.intern_ty(*ty), mutbl.stable()))
}
ty::Ref(_, _, _) => todo!(),
ty::FnDef(_, _) => todo!(),
ty::FnPtr(_) => todo!(),

View File

@ -20,6 +20,8 @@ pub enum TyKind {
RigidTy(RigidTy),
}
type Region = Opaque;
#[derive(Clone, Debug)]
pub enum RigidTy {
Bool,
@ -31,6 +33,7 @@ pub enum RigidTy {
Str,
Array(Ty, Const),
Slice(Ty),
RawPtr(Ty, Mutability),
Tuple(Vec<Ty>),
}