File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,12 @@ impl<'tcx> Tables<'tcx> {
119
119
TyKind :: RigidTy ( RigidTy :: Array ( self . intern_ty ( * ty) , opaque ( constant) ) )
120
120
}
121
121
ty:: Slice ( ty) => TyKind :: RigidTy ( RigidTy :: Slice ( self . intern_ty ( * ty) ) ) ,
122
- ty:: RawPtr ( _) => todo ! ( ) ,
123
- ty:: Ref ( _, _, _) => todo ! ( ) ,
122
+ ty:: RawPtr ( ty:: TypeAndMut { ty, mutbl } ) => {
123
+ TyKind :: RigidTy ( RigidTy :: RawPtr ( self . intern_ty ( * ty) , mutbl. stable ( ) ) )
124
+ }
125
+ ty:: Ref ( region, ty, mutbl) => {
126
+ TyKind :: RigidTy ( RigidTy :: Ref ( opaque ( region) , self . intern_ty ( * ty) , mutbl. stable ( ) ) )
127
+ }
124
128
ty:: FnDef ( _, _) => todo ! ( ) ,
125
129
ty:: FnPtr ( _) => todo ! ( ) ,
126
130
ty:: Dynamic ( _, _, _) => todo ! ( ) ,
Original file line number Diff line number Diff line change 1
- use crate :: rustc_internal :: Opaque ;
1
+ use crate :: stable_mir :: ty :: Region ;
2
2
use crate :: stable_mir:: { self , ty:: Ty } ;
3
3
4
4
#[ derive( Clone , Debug ) ]
@@ -137,8 +137,6 @@ pub enum Statement {
137
137
Nop ,
138
138
}
139
139
140
- type Region = Opaque ;
141
-
142
140
// FIXME this is incomplete
143
141
#[ derive( Clone , Debug ) ]
144
142
pub enum Rvalue {
Original file line number Diff line number Diff line change 1
- use super :: { with, DefId } ;
1
+ use super :: { mir :: Mutability , with, DefId } ;
2
2
use crate :: rustc_internal:: Opaque ;
3
3
4
4
#[ derive( Copy , Clone , Debug ) ]
@@ -11,7 +11,7 @@ impl Ty {
11
11
}
12
12
13
13
type Const = Opaque ;
14
- type Region = Opaque ;
14
+ pub ( crate ) type Region = Opaque ;
15
15
16
16
#[ derive( Clone , Debug ) ]
17
17
pub enum TyKind {
@@ -29,6 +29,8 @@ pub enum RigidTy {
29
29
Str ,
30
30
Array ( Ty , Const ) ,
31
31
Slice ( Ty ) ,
32
+ RawPtr ( Ty , Mutability ) ,
33
+ Ref ( Region , Ty , Mutability ) ,
32
34
Tuple ( Vec < Ty > ) ,
33
35
}
34
36
You can’t perform that action at this time.
0 commit comments