about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-13 13:23:19 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-13 13:23:19 -0800
commit40a62758a7db892a47cb59de85612e8a5b9ab267 (patch)
tree3c6dcc79492df7c2e3827f0f93968cd285ad268e
parent165efabbee6e2ea997bdbd7aee67f92554a83f80 (diff)
downloadrust-40a62758a7db892a47cb59de85612e8a5b9ab267.tar.gz
rust-40a62758a7db892a47cb59de85612e8a5b9ab267.zip
rename argument
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
index 858ca6deedc..7d39aa010da 100644
--- a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
+++ b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
@@ -183,10 +183,14 @@ fn fmt_printer<'a, 'tcx>(infcx: &'a InferCtxt<'tcx>, ns: Namespace) -> FmtPrinte
     printer
 }
 
-fn ty_to_string<'tcx>(infcx: &InferCtxt<'tcx>, ty: Ty<'tcx>, def_id: Option<DefId>) -> String {
+fn ty_to_string<'tcx>(
+    infcx: &InferCtxt<'tcx>,
+    ty: Ty<'tcx>,
+    called_method_def_id: Option<DefId>,
+) -> String {
     let printer = fmt_printer(infcx, Namespace::TypeNS);
     let ty = infcx.resolve_vars_if_possible(ty);
-    match (ty.kind(), def_id) {
+    match (ty.kind(), called_method_def_id) {
         // We don't want the regular output for `fn`s because it includes its path in
         // invalid pseudo-syntax, we want the `fn`-pointer output instead.
         (ty::FnDef(..), _) => ty.fn_sig(infcx.tcx).print(printer).unwrap().into_buffer(),