@@ -185,20 +185,20 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
185
185
if !method. substs . is_empty ( ) {
186
186
let method_generics = self . tcx . generics_of ( method. def_id ) ;
187
187
if !method_generics. params . is_empty ( ) {
188
- let user_type_annotation = self . infcx . probe ( |_| {
188
+ let user_type_annotation = self . probe ( |_| {
189
189
let user_substs = UserSubsts {
190
190
substs : InternalSubsts :: for_item ( self . tcx , method. def_id , |param, _| {
191
191
let i = param. index as usize ;
192
192
if i < method_generics. parent_count {
193
- self . infcx . var_for_def ( DUMMY_SP , param)
193
+ self . var_for_def ( DUMMY_SP , param)
194
194
} else {
195
195
method. substs [ i]
196
196
}
197
197
} ) ,
198
198
user_self_ty : None , // not relevant here
199
199
} ;
200
200
201
- self . infcx . canonicalize_user_type_annotation ( UserType :: TypeOf (
201
+ self . canonicalize_user_type_annotation ( UserType :: TypeOf (
202
202
method. def_id ,
203
203
user_substs,
204
204
) )
@@ -236,7 +236,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
236
236
debug ! ( "fcx {}" , self . tag( ) ) ;
237
237
238
238
if Self :: can_contain_user_lifetime_bounds ( ( substs, user_self_ty) ) {
239
- let canonicalized = self . infcx . canonicalize_user_type_annotation ( UserType :: TypeOf (
239
+ let canonicalized = self . canonicalize_user_type_annotation ( UserType :: TypeOf (
240
240
def_id,
241
241
UserSubsts { substs, user_self_ty } ,
242
242
) ) ;
@@ -480,7 +480,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
480
480
debug ! ( "to_ty_saving_user_provided_ty: ty={:?}" , ty) ;
481
481
482
482
if Self :: can_contain_user_lifetime_bounds ( ty) {
483
- let c_ty = self . infcx . canonicalize_response ( UserType :: Ty ( ty) ) ;
483
+ let c_ty = self . canonicalize_response ( UserType :: Ty ( ty) ) ;
484
484
debug ! ( "to_ty_saving_user_provided_ty: c_ty={:?}" , c_ty) ;
485
485
self . typeck_results . borrow_mut ( ) . user_provided_types_mut ( ) . insert ( ast_ty. hir_id , c_ty) ;
486
486
}
@@ -764,7 +764,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
764
764
if let ty:: subst:: GenericArgKind :: Type ( ty) = ty. unpack ( )
765
765
&& let ty:: Opaque ( def_id, _) = * ty. kind ( )
766
766
&& let Some ( def_id) = def_id. as_local ( )
767
- && self . infcx . opaque_type_origin ( def_id, DUMMY_SP ) . is_some ( ) {
767
+ && self . opaque_type_origin ( def_id, DUMMY_SP ) . is_some ( ) {
768
768
return None ;
769
769
}
770
770
}
@@ -826,7 +826,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
826
826
} else {
827
827
self . tcx . bound_type_of ( def_id)
828
828
} ;
829
- let substs = self . infcx . fresh_substs_for_item ( span, def_id) ;
829
+ let substs = self . fresh_substs_for_item ( span, def_id) ;
830
830
let ty = item_ty. subst ( self . tcx , substs) ;
831
831
832
832
self . write_resolution ( hir_id, Ok ( ( def_kind, def_id) ) ) ;
0 commit comments