@@ -108,7 +108,7 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction {
108108 if check_inputs( cx, body. params, None , args) ;
109109 let callee_ty = cx. typeck_results( ) . expr_ty_adjusted( callee) ;
110110 let call_ty = cx. typeck_results( ) . type_dependent_def_id( body. value. hir_id)
111- . map_or( callee_ty, |id| cx. tcx. bound_type_of ( id) . subst_identity( ) ) ;
111+ . map_or( callee_ty, |id| cx. tcx. type_of ( id) . subst_identity( ) ) ;
112112 if check_sig( cx, closure_ty, call_ty) ;
113113 let substs = cx. typeck_results( ) . node_substs( callee. hir_id) ;
114114 // This fixes some false positives that I don't entirely understand
@@ -153,7 +153,7 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction {
153153 if check_inputs( cx, body. params, Some ( receiver) , args) ;
154154 let method_def_id = cx. typeck_results( ) . type_dependent_def_id( body. value. hir_id) . unwrap( ) ;
155155 let substs = cx. typeck_results( ) . node_substs( body. value. hir_id) ;
156- let call_ty = cx. tcx. bound_type_of ( method_def_id) . subst( cx. tcx, substs) ;
156+ let call_ty = cx. tcx. type_of ( method_def_id) . subst( cx. tcx, substs) ;
157157 if check_sig( cx, closure_ty, call_ty) ;
158158 then {
159159 span_lint_and_then( cx, REDUNDANT_CLOSURE_FOR_METHOD_CALLS , expr. span, "redundant closure" , |diag| {
@@ -233,7 +233,7 @@ fn get_ufcs_type_name<'tcx>(cx: &LateContext<'tcx>, method_def_id: DefId, substs
233233 match assoc_item. container {
234234 ty:: TraitContainer => cx. tcx . def_path_str ( def_id) ,
235235 ty:: ImplContainer => {
236- let ty = cx. tcx . bound_type_of ( def_id) . skip_binder ( ) ;
236+ let ty = cx. tcx . type_of ( def_id) . skip_binder ( ) ;
237237 match ty. kind ( ) {
238238 ty:: Adt ( adt, _) => cx. tcx . def_path_str ( adt. did ( ) ) ,
239239 ty:: Array ( ..)
0 commit comments