diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-05 20:58:33 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-05 20:58:33 +0000 |
| commit | 75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445 (patch) | |
| tree | 0cdfbcc1ddcabad13de4047d2be8b8a6db1a4da7 /compiler | |
| parent | c4225812973cee4bba952cbf7a421f69871fed0d (diff) | |
| download | rust-75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445.tar.gz rust-75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445.zip | |
Use verbose suggestion for changing arg type
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_impl_item.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index b5b68471b9d..0dbe64c3ea7 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -981,7 +981,7 @@ fn report_trait_method_mismatch<'tcx>( .next() .unwrap_or(impl_err_span); - diag.span_suggestion( + diag.span_suggestion_verbose( span, "change the self-receiver type to match the trait", sugg, @@ -1005,12 +1005,12 @@ fn report_trait_method_mismatch<'tcx>( } hir::FnRetTy::Return(hir_ty) => { let sugg = trait_sig.output(); - diag.span_suggestion(hir_ty.span, msg, sugg, ap); + diag.span_suggestion_verbose(hir_ty.span, msg, sugg, ap); } }; }; } else if let Some(trait_ty) = trait_sig.inputs().get(*i) { - diag.span_suggestion( + diag.span_suggestion_verbose( impl_err_span, "change the parameter type to match the trait", trait_ty, |
