@@ -121,10 +121,10 @@ impl<'tcx> TypeFoldable<'tcx> for LvalueTy<'tcx> {
121121}
122122
123123impl < ' 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 > {
125125 match * self {
126126 Lvalue :: Local ( index) =>
127- LvalueTy :: Ty { ty : local_decls. as_ref ( ) [ index] . ty } ,
127+ LvalueTy :: Ty { ty : local_decls. local_decls ( ) [ index] . ty } ,
128128 Lvalue :: Static ( ref data) =>
129129 LvalueTy :: Ty { ty : data. ty } ,
130130 Lvalue :: Projection ( ref proj) =>
@@ -134,7 +134,7 @@ impl<'tcx> Lvalue<'tcx> {
134134}
135135
136136impl < ' 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 >
138138 {
139139 match * self {
140140 Rvalue :: Use ( ref operand) => operand. ty ( local_decls, tcx) ,
@@ -206,7 +206,7 @@ impl<'tcx> Rvalue<'tcx> {
206206}
207207
208208impl < ' 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 > {
210210 match self {
211211 & Operand :: Consume ( ref l) => l. ty ( local_decls, tcx) . to_ty ( tcx) ,
212212 & Operand :: Constant ( ref c) => c. ty ,
0 commit comments