Skip to content

Commit caa01ad

Browse files
committed
Add Never to SMIR
1 parent 9b32319 commit caa01ad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_smir/src/rustc_smir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<'tcx> Tables<'tcx> {
132132
ty::Dynamic(_, _, _) => todo!(),
133133
ty::Closure(_, _) => todo!(),
134134
ty::Generator(_, _, _) => todo!(),
135-
ty::Never => todo!(),
135+
ty::Never => TyKind::RigidTy(RigidTy::Never),
136136
ty::Tuple(fields) => TyKind::RigidTy(RigidTy::Tuple(
137137
fields.iter().map(|ty| self.intern_ty(ty)).collect(),
138138
)),

compiler/rustc_smir/src/stable_mir/ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub enum RigidTy {
3232
Slice(Ty),
3333
RawPtr(Ty, Mutability),
3434
Ref(Region, Ty, Mutability),
35+
Never,
3536
Tuple(Vec<Ty>),
3637
}
3738

0 commit comments

Comments
 (0)