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('}') => "",
|
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",
|
"try adding an expression at the end of the block",
|
||||||
return_suggestions.into_iter().map(|r| {
|
return_suggestions
|
||||||
vec![(
|
.into_iter()
|
||||||
span.shrink_to_hi(),
|
.map(|r| format!("{}\n{}{}", semicolon, indent, r)),
|
||||||
format!("{}\n{}{}", semicolon, indent, r),
|
|
||||||
)]
|
|
||||||
}),
|
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue