about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 0bc71de90ff..b786c52e688 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -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(