1
Fork 0

Add Never to SMIR

This commit is contained in:
Santiago Pastorino 2023-07-18 12:02:35 -03:00
parent 9b32319205
commit caa01adbd0
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 2 additions and 1 deletions

View file

@ -132,7 +132,7 @@ impl<'tcx> Tables<'tcx> {
ty::Dynamic(_, _, _) => todo!(), ty::Dynamic(_, _, _) => todo!(),
ty::Closure(_, _) => todo!(), ty::Closure(_, _) => todo!(),
ty::Generator(_, _, _) => todo!(), ty::Generator(_, _, _) => todo!(),
ty::Never => todo!(), ty::Never => TyKind::RigidTy(RigidTy::Never),
ty::Tuple(fields) => TyKind::RigidTy(RigidTy::Tuple( ty::Tuple(fields) => TyKind::RigidTy(RigidTy::Tuple(
fields.iter().map(|ty| self.intern_ty(ty)).collect(), fields.iter().map(|ty| self.intern_ty(ty)).collect(),
)), )),

View file

@ -32,6 +32,7 @@ pub enum RigidTy {
Slice(Ty), Slice(Ty),
RawPtr(Ty, Mutability), RawPtr(Ty, Mutability),
Ref(Region, Ty, Mutability), Ref(Region, Ty, Mutability),
Never,
Tuple(Vec<Ty>), Tuple(Vec<Ty>),
} }