mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rollup merge of #106365 - gimbles:patch-1, r=jyn514
Grammar : Missing "is" in format specifier diagnostic
This commit is contained in:
commit
01d99f6569
@ -638,7 +638,7 @@ fn report_missing_placeholders(
|
|||||||
if show_doc_note {
|
if show_doc_note {
|
||||||
diag.note(concat!(
|
diag.note(concat!(
|
||||||
stringify!($kind),
|
stringify!($kind),
|
||||||
" formatting not supported; see the documentation for `std::fmt`",
|
" formatting is not supported; see the documentation for `std::fmt`",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if suggestions.len() > 0 {
|
if suggestions.len() > 0 {
|
||||||
|
@ -170,7 +170,7 @@ LL | format!("foo %s baz", "bar");
|
|||||||
| |
|
| |
|
||||||
| help: format specifiers use curly braces: `{}`
|
| help: format specifiers use curly braces: `{}`
|
||||||
|
|
|
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: invalid format string: expected `'}'`, found `'t'`
|
error: invalid format string: expected `'}'`, found `'t'`
|
||||||
--> $DIR/ifmt-bad-arg.rs:75:1
|
--> $DIR/ifmt-bad-arg.rs:75:1
|
||||||
|
@ -10,5 +10,5 @@ fn main() {
|
|||||||
//~| NOTE: argument never used
|
//~| NOTE: argument never used
|
||||||
//~| NOTE: argument never used
|
//~| NOTE: argument never used
|
||||||
//~| NOTE: format specifiers use curly braces, and you have to use a positional or named parameter for the width
|
//~| NOTE: format specifiers use curly braces, and you have to use a positional or named parameter for the width
|
||||||
//~| NOTE: printf formatting not supported
|
//~| NOTE: printf formatting is not supported
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ note: format specifiers use curly braces, and you have to use a positional or na
|
|||||||
|
|
|
|
||||||
LL | print!("%0*x", width, num);
|
LL | print!("%0*x", width, num);
|
||||||
| ^^^^
|
| ^^^^
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ LL | println!("%.*3$s %s!\n", "Hello,", "World", 4);
|
|||||||
| | argument never used
|
| | argument never used
|
||||||
| multiple missing formatting specifiers
|
| multiple missing formatting specifiers
|
||||||
|
|
|
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
help: format specifiers use curly braces
|
help: format specifiers use curly braces
|
||||||
|
|
|
|
||||||
LL | println!("{:.2$} {}!\n", "Hello,", "World", 4);
|
LL | println!("{:.2$} {}!\n", "Hello,", "World", 4);
|
||||||
@ -22,7 +22,7 @@ LL | println!("%1$*2$.*3$f", 123.456);
|
|||||||
| |
|
| |
|
||||||
| help: format specifiers use curly braces: `{0:1$.2$}`
|
| help: format specifiers use curly braces: `{0:1$.2$}`
|
||||||
|
|
|
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: multiple unused formatting arguments
|
error: multiple unused formatting arguments
|
||||||
--> $DIR/format-foreign.rs:6:7
|
--> $DIR/format-foreign.rs:6:7
|
||||||
@ -37,7 +37,7 @@ LL | | "###, "Hello,", "World", 4);
|
|||||||
| |____| argument never used
|
| |____| argument never used
|
||||||
| multiple missing formatting specifiers
|
| multiple missing formatting specifiers
|
||||||
|
|
|
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
help: format specifiers use curly braces
|
help: format specifiers use curly braces
|
||||||
|
|
|
|
||||||
LL ~ println!(r###"{:.2$}
|
LL ~ println!(r###"{:.2$}
|
||||||
@ -60,7 +60,7 @@ LL | println!("Hi there, $NAME.", NAME="Tim");
|
|||||||
| |
|
| |
|
||||||
| help: format specifiers use curly braces: `{NAME}`
|
| help: format specifiers use curly braces: `{NAME}`
|
||||||
|
|
|
|
||||||
= note: shell formatting not supported; see the documentation for `std::fmt`
|
= note: shell formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: multiple unused formatting arguments
|
error: multiple unused formatting arguments
|
||||||
--> $DIR/format-foreign.rs:15:32
|
--> $DIR/format-foreign.rs:15:32
|
||||||
@ -72,7 +72,7 @@ LL | println!("$1 $0 $$ $NAME", 1, 2, NAME=3);
|
|||||||
| | argument never used
|
| | argument never used
|
||||||
| multiple missing formatting specifiers
|
| multiple missing formatting specifiers
|
||||||
|
|
|
|
||||||
= note: shell formatting not supported; see the documentation for `std::fmt`
|
= note: shell formatting is not supported; see the documentation for `std::fmt`
|
||||||
help: format specifiers use curly braces
|
help: format specifiers use curly braces
|
||||||
|
|
|
|
||||||
LL | println!("{1} {0} $$ {NAME}", 1, 2, NAME=3);
|
LL | println!("{1} {0} $$ {NAME}", 1, 2, NAME=3);
|
||||||
|
@ -44,7 +44,7 @@ LL | "things"
|
|||||||
LL | , UNUSED="args");
|
LL | , UNUSED="args");
|
||||||
| ^^^^^^ named argument never used
|
| ^^^^^^ named argument never used
|
||||||
|
|
|
|
||||||
= note: shell formatting not supported; see the documentation for `std::fmt`
|
= note: shell formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ note: format specifiers use curly braces, and the conversion specifier `
|
|||||||
|
|
|
|
||||||
LL | pub fn main() { println!("🦀%%%", 0) }
|
LL | pub fn main() { println!("🦀%%%", 0) }
|
||||||
| ^^
|
| ^^
|
||||||
= note: printf formatting not supported; see the documentation for `std::fmt`
|
= note: printf formatting is not supported; see the documentation for `std::fmt`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user