Suggest space separated format str literal
This commit is contained in:
parent
8b59fbc951
commit
83a8af50bb
@ -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(
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user