Reword missing formatting arguments label
This commit is contained in:
parent
f487e39e91
commit
f9e37625e6
@ -928,7 +928,7 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt,
|
|||||||
errs.iter().map(|&(sp, _)| sp).collect::<Vec<Span>>(),
|
errs.iter().map(|&(sp, _)| sp).collect::<Vec<Span>>(),
|
||||||
"multiple unused formatting arguments",
|
"multiple unused formatting arguments",
|
||||||
);
|
);
|
||||||
diag.span_label(cx.fmtsp, "multiple missing formatting arguments");
|
diag.span_label(cx.fmtsp, "multiple missing formatting specifiers");
|
||||||
diag
|
diag
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -80,7 +80,7 @@ error: multiple unused formatting arguments
|
|||||||
LL | format!("", 1, 2); //~ 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
|
error: argument never used
|
||||||
--> $DIR/ifmt-bad-arg.rs:43:22
|
--> $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
|
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`
|
error: duplicate argument named `foo`
|
||||||
--> $DIR/ifmt-bad-arg.rs:50:33
|
--> $DIR/ifmt-bad-arg.rs:50:33
|
||||||
|
@ -4,7 +4,7 @@ error: multiple unused formatting arguments
|
|||||||
LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ 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: `%.*3$s` should be written as `{:.2$}`
|
||||||
= help: `%s` should be written as `{}`
|
= help: `%s` should be written as `{}`
|
||||||
|
@ -4,13 +4,13 @@ error: multiple unused formatting arguments
|
|||||||
LL | println!("Test", 123, 456, 789);
|
LL | println!("Test", 123, 456, 789);
|
||||||
| ------ ^^^ ^^^ ^^^
|
| ------ ^^^ ^^^ ^^^
|
||||||
| |
|
| |
|
||||||
| multiple missing formatting arguments
|
| multiple missing formatting specifiers
|
||||||
|
|
||||||
error: multiple unused formatting arguments
|
error: multiple unused formatting arguments
|
||||||
--> $DIR/format-unused-lables.rs:16:9
|
--> $DIR/format-unused-lables.rs:16:9
|
||||||
|
|
|
|
||||||
LL | println!("Test2",
|
LL | println!("Test2",
|
||||||
| ------- multiple missing formatting arguments
|
| ------- multiple missing formatting specifiers
|
||||||
LL | 123, //~ ERROR multiple unused formatting arguments
|
LL | 123, //~ ERROR multiple unused formatting arguments
|
||||||
| ^^^
|
| ^^^
|
||||||
LL | 456,
|
LL | 456,
|
||||||
@ -28,7 +28,7 @@ error: multiple unused formatting arguments
|
|||||||
--> $DIR/format-unused-lables.rs:24:9
|
--> $DIR/format-unused-lables.rs:24:9
|
||||||
|
|
|
|
||||||
LL | println!("Some more $STUFF",
|
LL | println!("Some more $STUFF",
|
||||||
| ------------------ multiple missing formatting arguments
|
| ------------------ multiple missing formatting specifiers
|
||||||
LL | "woo!", //~ ERROR multiple unused formatting arguments
|
LL | "woo!", //~ ERROR multiple unused formatting arguments
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
LL | STUFF=
|
LL | STUFF=
|
||||||
|
Loading…
Reference in New Issue
Block a user