mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Plurals in format redundant arguments suggestion
This commit is contained in:
parent
4a7a98cf30
commit
fcdd5c0b2d
@ -139,7 +139,10 @@ builtin_macros_format_positional_after_named = positional arguments cannot follo
|
|||||||
|
|
||||||
builtin_macros_format_remove_raw_ident = remove the `r#`
|
builtin_macros_format_remove_raw_ident = remove the `r#`
|
||||||
|
|
||||||
builtin_macros_format_redundant_args = redundant argument
|
builtin_macros_format_redundant_args = redundant {$n ->
|
||||||
|
[one] argument
|
||||||
|
*[more] arguments
|
||||||
|
}
|
||||||
.help = {$n ->
|
.help = {$n ->
|
||||||
[one] the formatting string already captures the binding directly, it doesn't need to be included in the argument list
|
[one] the formatting string already captures the binding directly, it doesn't need to be included in the argument list
|
||||||
*[more] the formatting strings already captures the bindings directly, they don't need to be included in the argument list
|
*[more] the formatting strings already captures the bindings directly, they don't need to be included in the argument list
|
||||||
|
@ -34,7 +34,7 @@ note: the formatting specifier is referencing the binding already
|
|||||||
LL | println!("{} {x}", x, x);
|
LL | println!("{} {x}", x, x);
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: redundant argument
|
error: redundant arguments
|
||||||
--> $DIR/issue-105225.rs:13:14
|
--> $DIR/issue-105225.rs:13:14
|
||||||
|
|
|
|
||||||
LL | println!("{x} {y}", x, y);
|
LL | println!("{x} {y}", x, y);
|
||||||
@ -51,7 +51,7 @@ LL - println!("{x} {y}", x, y);
|
|||||||
LL + println!("{x} {y}", );
|
LL + println!("{x} {y}", );
|
||||||
|
|
|
|
||||||
|
|
||||||
error: redundant argument
|
error: redundant arguments
|
||||||
--> $DIR/issue-105225.rs:17:14
|
--> $DIR/issue-105225.rs:17:14
|
||||||
|
|
|
|
||||||
LL | println!("{} {} {x} {y} {}", x, x, x, y, y);
|
LL | println!("{} {} {x} {y} {}", x, x, x, y, y);
|
||||||
|
Loading…
Reference in New Issue
Block a user