Skip to content

Commit 09e4a75

Browse files
committed
Use span_suggestions instead of multipart_suggestions.
1 parent 5a25751 commit 09e4a75

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

compiler/rustc_typeck/src/check/demand.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
227227
Ok(s) if s.ends_with('}') => "",
228228
_ => ";",
229229
};
230-
err.multipart_suggestions(
230+
err.span_suggestions(
231+
span.shrink_to_hi(),
231232
"try adding an expression at the end of the block",
232-
return_suggestions.into_iter().map(|r| {
233-
vec![(
234-
span.shrink_to_hi(),
235-
format!("{}\n{}{}", semicolon, indent, r),
236-
)]
237-
}),
233+
return_suggestions
234+
.into_iter()
235+
.map(|r| format!("{}\n{}{}", semicolon, indent, r)),
238236
Applicability::MaybeIncorrect,
239237
);
240238
}

0 commit comments

Comments
 (0)