@@ -121,10 +121,10 @@ impl<'tcx> TypeFoldable<'tcx> for LvalueTy<'tcx> {
121
121
}
122
122
123
123
impl < ' tcx > Lvalue < ' tcx > {
124
- pub fn ty < ' a , ' gcx , D : AsLocalDeclsRef < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> LvalueTy < ' tcx > {
124
+ pub fn ty < ' a , ' gcx , D : HasLocalDecls < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> LvalueTy < ' tcx > {
125
125
match * self {
126
126
Lvalue :: Local ( index) =>
127
- LvalueTy :: Ty { ty : local_decls. as_ref ( ) [ index] . ty } ,
127
+ LvalueTy :: Ty { ty : local_decls. local_decls ( ) [ index] . ty } ,
128
128
Lvalue :: Static ( ref data) =>
129
129
LvalueTy :: Ty { ty : data. ty } ,
130
130
Lvalue :: Projection ( ref proj) =>
@@ -134,7 +134,7 @@ impl<'tcx> Lvalue<'tcx> {
134
134
}
135
135
136
136
impl < ' tcx > Rvalue < ' tcx > {
137
- pub fn ty < ' a , ' gcx , D : AsLocalDeclsRef < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Ty < ' tcx >
137
+ pub fn ty < ' a , ' gcx , D : HasLocalDecls < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Ty < ' tcx >
138
138
{
139
139
match * self {
140
140
Rvalue :: Use ( ref operand) => operand. ty ( local_decls, tcx) ,
@@ -206,7 +206,7 @@ impl<'tcx> Rvalue<'tcx> {
206
206
}
207
207
208
208
impl < ' tcx > Operand < ' tcx > {
209
- pub fn ty < ' a , ' gcx , D : AsLocalDeclsRef < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Ty < ' tcx > {
209
+ pub fn ty < ' a , ' gcx , D : HasLocalDecls < ' tcx > > ( & self , local_decls : & D , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Ty < ' tcx > {
210
210
match self {
211
211
& Operand :: Consume ( ref l) => l. ty ( local_decls, tcx) . to_ty ( tcx) ,
212
212
& Operand :: Constant ( ref c) => c. ty ,
0 commit comments