Add spaces before and after expr in add {} suggestion

Co-authored-by: Michael Goulet <michael@errs.io>
This commit is contained in:
Waffle Maybe 2022-06-06 01:35:37 +04:00 committed by Maybe Waffle
parent f06f051745
commit 4f85a73e51
3 changed files with 14 additions and 14 deletions

View file

@ -1593,8 +1593,8 @@ impl<'a> Parser<'a> {
let sugg_msg = "consider enclosing expression in a block";
let suggestions = vec![
(span.shrink_to_lo(), "{".to_owned()),
(span.shrink_to_hi(), "}".to_owned()),
(span.shrink_to_lo(), "{ ".to_owned()),
(span.shrink_to_hi(), " }".to_owned()),
];
err.multipart_suggestion_verbose(