We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe03b46 + fd5553f commit 320b412Copy full SHA for 320b412
compiler/rustc_smir/src/rustc_smir/mod.rs
@@ -114,9 +114,11 @@ impl<'tcx> Tables<'tcx> {
114
),
115
)),
116
ty::Foreign(_) => todo!(),
117
- ty::Str => todo!(),
118
- ty::Array(_, _) => todo!(),
119
- ty::Slice(_) => todo!(),
+ ty::Str => TyKind::RigidTy(RigidTy::Str),
+ ty::Array(ty, constant) => {
+ TyKind::RigidTy(RigidTy::Array(self.intern_ty(*ty), opaque(constant)))
120
+ }
121
+ ty::Slice(ty) => TyKind::RigidTy(RigidTy::Slice(self.intern_ty(*ty))),
122
ty::RawPtr(_) => todo!(),
123
ty::Ref(_, _, _) => todo!(),
124
ty::FnDef(_, _) => todo!(),
compiler/rustc_smir/src/stable_mir/ty.rs
@@ -26,6 +26,9 @@ pub enum RigidTy {
26
Uint(UintTy),
27
Float(FloatTy),
28
Adt(AdtDef, AdtSubsts),
29
+ Str,
30
+ Array(Ty, Const),
31
+ Slice(Ty),
32
Tuple(Vec<Ty>),
33
}
34
0 commit comments