about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIQuant <quant3234@gmail.com>2023-03-11 17:39:14 +0300
committerIQuant <quant3234@gmail.com>2023-04-04 18:50:07 +0300
commit467d367df75121dd305626ea2fb4459af588d29c (patch)
treeb40ebfa37712e0e170bf6576feafc1d37308fd03
parent21d5bedd5f7564d62096e485f2fcb6a8956f1dec (diff)
downloadrust-467d367df75121dd305626ea2fb4459af588d29c.tar.gz
rust-467d367df75121dd305626ea2fb4459af588d29c.zip
Rename tuple_wrap_err_subdiag to suggest_wrap_to_build_a_tuple, making it more consistent with similar functions
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs
index 3bb4e1c6b29..ca4f1c20b89 100644
--- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs
+++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs
@@ -1935,7 +1935,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
                 // parentheses around it, perhaps the user meant to write `(expr,)` to
                 // build a tuple (issue #86100)
                 (ty::Tuple(fields), _) => {
-                    suggestions.extend(self.tuple_wrap_err_subdiag( span, found, fields))
+                    suggestions.extend(self.suggest_wrap_to_build_a_tuple( span, found, fields))
                 }
                 // If a byte was expected and the found expression is a char literal
                 // containing a single ASCII character, perhaps the user meant to write `b'c'` to
@@ -1976,7 +1976,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
                 (ty::Bool, ty::Tuple(list)) => if list.len() == 0 {
                     suggestions.extend(self.suggest_let_for_letchains(&trace.cause, span));
                 }
-                (ty::Array(_, _), ty::Array(_, _)) => suggestions.extend(self.specify_actual_length(terr, trace, span)),
+                (ty::Array(_, _), ty::Array(_, _)) => suggestions.extend(self.suggest_specify_actual_length(terr, trace, span)),
                 _ => {}
             }
         }
@@ -1990,7 +1990,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
         suggestions
     }
 
-    fn specify_actual_length(
+    fn suggest_specify_actual_length(
         &self,
         terr: TypeError<'_>,
         trace: &TypeTrace<'_>,
@@ -2068,7 +2068,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
         diag
     }
 
-    fn tuple_wrap_err_subdiag(
+    fn suggest_wrap_to_build_a_tuple(
         &self,
         span: Span,
         found: Ty<'tcx>,