File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,11 @@ impl<'tcx> Tables<'tcx> {
96
96
} ,
97
97
ty:: Adt ( _, _) => todo ! ( ) ,
98
98
ty:: Foreign ( _) => todo ! ( ) ,
99
- ty:: Str => todo ! ( ) ,
100
- ty:: Array ( _, _) => todo ! ( ) ,
101
- ty:: Slice ( _) => todo ! ( ) ,
99
+ ty:: Str => TyKind :: RigidTy ( RigidTy :: Str ) ,
100
+ ty:: Array ( ty, constant) => {
101
+ TyKind :: RigidTy ( RigidTy :: Array ( self . intern_ty ( * ty) , opaque ( constant) ) )
102
+ }
103
+ ty:: Slice ( ty) => TyKind :: RigidTy ( RigidTy :: Slice ( self . intern_ty ( * ty) ) ) ,
102
104
ty:: RawPtr ( _) => todo ! ( ) ,
103
105
ty:: Ref ( _, _, _) => todo ! ( ) ,
104
106
ty:: FnDef ( _, _) => todo ! ( ) ,
Original file line number Diff line number Diff line change 1
1
use super :: with;
2
+ use crate :: rustc_internal:: Opaque ;
2
3
3
4
#[ derive( Copy , Clone , Debug ) ]
4
5
pub struct Ty ( pub usize ) ;
@@ -21,6 +22,9 @@ pub enum RigidTy {
21
22
Int ( IntTy ) ,
22
23
Uint ( UintTy ) ,
23
24
Float ( FloatTy ) ,
25
+ Str ,
26
+ Array ( Ty , Const ) ,
27
+ Slice ( Ty ) ,
24
28
Tuple ( Vec < Ty > ) ,
25
29
}
26
30
@@ -49,3 +53,5 @@ pub enum FloatTy {
49
53
F32 ,
50
54
F64 ,
51
55
}
56
+
57
+ type Const = Opaque ;
You can’t perform that action at this time.
0 commit comments