Use span_suggestions instead of multipart_suggestions.
This commit is contained in:
parent
5a25751c1e
commit
09e4a75f29
1 changed files with 5 additions and 7 deletions
|
@ -227,14 +227,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
Ok(s) if s.ends_with('}') => "",
|
||||
_ => ";",
|
||||
};
|
||||
err.multipart_suggestions(
|
||||
err.span_suggestions(
|
||||
span.shrink_to_hi(),
|
||||
"try adding an expression at the end of the block",
|
||||
return_suggestions.into_iter().map(|r| {
|
||||
vec![(
|
||||
span.shrink_to_hi(),
|
||||
format!("{}\n{}{}", semicolon, indent, r),
|
||||
)]
|
||||
}),
|
||||
return_suggestions
|
||||
.into_iter()
|
||||
.map(|r| format!("{}\n{}{}", semicolon, indent, r)),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue