about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <ffmancera@riseup.net>2024-02-20 09:31:01 +0100
committerFernando Fernandez Mancera <ffmancera@riseup.net>2024-02-20 23:48:59 +0100
commite35481f90bcd7e4a646aabab1183a33bebae8c94 (patch)
treed29b4d58c3264759f9efc4a6417b924b1a97ea5c /compiler/rustc_trait_selection/src/traits
parente54ef0a7ab42f6af8804632b1b5858c606fe1c3c (diff)
Suggest using --verbose when writing type to a file
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 335e6ff2822..8f64065dadd 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -1554,6 +1554,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                             "the full type name has been written to '{}'",
                             file.display()
                         ));
+                        err.note(format!(
+                            "consider using `--verbose` to print full type name to the console"
+                        ));
                     }
 
                     if imm_ref_self_ty_satisfies_pred && mut_ref_self_ty_satisfies_pred {
@@ -3133,6 +3136,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                         "the full name for the type has been written to '{}'",
                         file.display(),
                     ));
+                    err.note(format!(
+                        "consider using `--verbose` to print the full type name to the console"
+                    ));
                 }
             }
             ObligationCauseCode::RepeatElementCopy {
@@ -3600,6 +3606,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                         "the full type name has been written to '{}'",
                         file.display(),
                     ));
+                    err.note(format!(
+                        "consider using `--verbose` to print the full type name to the console"
+                    ));
                 }
                 let mut parent_predicate = parent_trait_pred;
                 let mut data = &data.derived;
@@ -3653,6 +3662,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                             "the full type name has been written to '{}'",
                             file.display(),
                         ));
+                        err.note(format!(
+                            "consider using `--verbose` to print the full type name to the console"
+                        ));
                     }
                 }
                 // #74711: avoid a stack overflow