Reword missing formatting arguments label

This commit is contained in:
Esteban Küber 2018-07-24 09:51:04 -07:00
parent f487e39e91
commit f9e37625e6
4 changed files with 7 additions and 7 deletions

View File

@ -928,7 +928,7 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt,
errs.iter().map(|&(sp, _)| sp).collect::<Vec<Span>>(),
"multiple unused formatting arguments",
);
diag.span_label(cx.fmtsp, "multiple missing formatting arguments");
diag.span_label(cx.fmtsp, "multiple missing formatting specifiers");
diag
}
};

View File

@ -80,7 +80,7 @@ error: multiple unused formatting arguments
LL | format!("", 1, 2); //~ ERROR: multiple unused formatting arguments
| -- ^ ^
| |
| multiple missing formatting arguments
| multiple missing formatting specifiers
error: argument never used
--> $DIR/ifmt-bad-arg.rs:43:22
@ -118,7 +118,7 @@ error: multiple unused formatting arguments
LL | format!("{} {}", 1, 2, foo=1, bar=2); //~ ERROR: multiple unused formatting arguments
| ------- ^ ^
| |
| multiple missing formatting arguments
| multiple missing formatting specifiers
error: duplicate argument named `foo`
--> $DIR/ifmt-bad-arg.rs:50:33

View File

@ -4,7 +4,7 @@ error: multiple unused formatting arguments
LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments
| -------------- ^^^^^^^^ ^^^^^^^ ^
| |
| multiple missing formatting arguments
| multiple missing formatting specifiers
|
= help: `%.*3$s` should be written as `{:.2$}`
= help: `%s` should be written as `{}`

View File

@ -4,13 +4,13 @@ error: multiple unused formatting arguments
LL | println!("Test", 123, 456, 789);
| ------ ^^^ ^^^ ^^^
| |
| multiple missing formatting arguments
| multiple missing formatting specifiers
error: multiple unused formatting arguments
--> $DIR/format-unused-lables.rs:16:9
|
LL | println!("Test2",
| ------- multiple missing formatting arguments
| ------- multiple missing formatting specifiers
LL | 123, //~ ERROR multiple unused formatting arguments
| ^^^
LL | 456,
@ -28,7 +28,7 @@ error: multiple unused formatting arguments
--> $DIR/format-unused-lables.rs:24:9
|
LL | println!("Some more $STUFF",
| ------------------ multiple missing formatting arguments
| ------------------ multiple missing formatting specifiers
LL | "woo!", //~ ERROR multiple unused formatting arguments
| ^^^^^^
LL | STUFF=