about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/errors
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-05 01:08:44 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-22 22:04:49 +0000
commitc807ac034089e31364baa24e19d5d61cbb657989 (patch)
treed5d0248a8aad7a51fc1a7ab5425520b584f80686 /compiler/rustc_hir_analysis/src/errors
parent2a1c384f0e44ad01ac5c85f0cd9de58c97981974 (diff)
downloadrust-c807ac034089e31364baa24e19d5d61cbb657989.tar.gz
rust-c807ac034089e31364baa24e19d5d61cbb657989.zip
Use verbose suggestion for "wrong # of generics"
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors')
-rw-r--r--compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
index 10be69a9fbb..c2d5627f2b0 100644
--- a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
+++ b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
@@ -888,7 +888,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
         let comma = if args.len() > 0 { ", " } else { "" };
         let trait_path = self.tcx.def_path_str(trait_def_id);
         let method_name = self.tcx.item_name(self.def_id);
-        err.span_suggestion(
+        err.span_suggestion_verbose(
             expr.span,
             msg,
             format!("{trait_path}::{generics}::{method_name}({rcvr}{comma}{rest})"),
@@ -952,7 +952,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 s = pluralize!(num_redundant_lt_args),
             );
 
-            err.span_suggestion(
+            err.span_suggestion_verbose(
                 span_redundant_lt_args,
                 msg_lifetimes,
                 "",
@@ -994,7 +994,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 s = pluralize!(num_redundant_gen_args),
             );
 
-            err.span_suggestion(
+            err.span_suggestion_verbose(
                 span_redundant_type_or_const_args,
                 msg_types_or_consts,
                 "",
@@ -1044,7 +1044,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 },
             );
 
-            err.span_suggestion(span, msg, "", Applicability::MaybeIncorrect);
+            err.span_suggestion_verbose(span, msg, "", Applicability::MaybeIncorrect);
         } else if redundant_lifetime_args && redundant_type_or_const_args {
             remove_lifetime_args(err);
             remove_type_or_const_args(err);