1
Fork 0

use verbose suggestions

This commit is contained in:
lcnr 2022-05-24 09:57:14 +02:00
parent 3fe346e7a3
commit bc0d12cc6c
5 changed files with 26 additions and 10 deletions

View file

@ -422,7 +422,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
(receiver.span.shrink_to_lo(), format!("{def_path}({adjustment}")),
(receiver.span.shrink_to_hi().with_hi(successor.1), successor.0.to_string()),
];
err.multipart_suggestion(
err.multipart_suggestion_verbose(
"try using a fully qualified path to specify the expected types",
suggestion,
Applicability::HasPlaceholders,
@ -441,7 +441,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
],
None => vec![(data.span(), format!("{}{}{}", arrow, ret, post))],
};
err.multipart_suggestion(
err.multipart_suggestion_verbose(
"try giving this closure an explicit return type",
suggestion,
Applicability::HasPlaceholders,