diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs index 7acfb08020fd..9f153c36733b 100644 --- a/src/libsyntax_ext/format.rs +++ b/src/libsyntax_ext/format.rs @@ -728,7 +728,7 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt, Err(mut err) => { let sugg_fmt = match args.len() { 0 => "{}".to_string(), - _ => format!("{}{{}}", "{}, ".repeat(args.len())), + _ => format!("{}{{}}", "{} ".repeat(args.len())), }; err.span_suggestion( diff --git a/src/test/ui/macros/bad_hello.stderr b/src/test/ui/macros/bad_hello.stderr index 87ea515182f1..c675eede2152 100644 --- a/src/test/ui/macros/bad_hello.stderr +++ b/src/test/ui/macros/bad_hello.stderr @@ -15,8 +15,8 @@ LL | println!(3, 4); | ^ help: you might be missing a string literal to format with | -LL | println!("{}, {}", 3, 4); - | ^^^^^^^^^ +LL | println!("{} {}", 3, 4); + | ^^^^^^^^ error: aborting due to 2 previous errors