@@ -195,7 +195,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
195195 let ty_string = self . ty_to_string ( actual) ;
196196 let is_method = mode == Mode :: MethodCall ;
197197 let mut suggestion = None ;
198- let type_str = if is_method {
198+ let item_kind = if is_method {
199199 "method"
200200 } else if actual. is_enum ( ) {
201201 if let TyAdt ( ref adt_def, _) = actual. sty {
@@ -235,7 +235,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
235235 span,
236236 E0689 ,
237237 "can't call {} `{}` on ambiguous numeric type `{}`" ,
238- type_str ,
238+ item_kind ,
239239 item_name,
240240 ty_string
241241 ) ;
@@ -284,12 +284,12 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
284284 span,
285285 E0599 ,
286286 "no {} named `{}` found for type `{}` in the current scope" ,
287- type_str ,
287+ item_kind ,
288288 item_name,
289289 ty_string
290290 ) ;
291291 if let Some ( suggestion) = suggestion {
292- err. note ( & format ! ( "did you mean `{}::{}`?" , type_str , suggestion) ) ;
292+ err. note ( & format ! ( "did you mean `{}::{}`?" , ty_string , suggestion) ) ;
293293 }
294294 err
295295 }
@@ -301,7 +301,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
301301 if let Some ( full_sp) = tcx. hir . span_if_local ( def. did ) {
302302 let def_sp = tcx. sess . codemap ( ) . def_span ( full_sp) ;
303303 err. span_label ( def_sp, format ! ( "{} `{}` not found {}" ,
304- type_str ,
304+ item_kind ,
305305 item_name,
306306 if def. is_enum( ) && !is_method {
307307 "here"
@@ -355,7 +355,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
355355 }
356356 }
357357 } else {
358- err. span_label ( span, format ! ( "{} not found in `{}`" , type_str , ty_string) ) ;
358+ err. span_label ( span, format ! ( "{} not found in `{}`" , item_kind , ty_string) ) ;
359359 }
360360
361361 if self . is_fn_ty ( & rcvr_ty, span) {
0 commit comments