]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/format-foreign.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / macros / format-foreign.rs
1 fn main() {
2     println!("%.*3$s %s!\n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments
3     println!("%1$*2$.*3$f", 123.456); //~ ERROR never used
4     println!(r###"%.*3$s
5         %s!\n
6 "###, "Hello,", "World", 4);
7     //~^ ERROR multiple unused formatting arguments
8     // correctly account for raw strings in inline suggestions
9
10     // This should *not* produce hints, on the basis that there's equally as
11     // many "correct" format specifiers.  It's *probably* just an actual typo.
12     println!("{} %f", "one", 2.0); //~ ERROR never used
13
14     println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used
15     println!("$1 $0 $$ $NAME", 1, 2, NAME=3);
16     //~^ ERROR multiple unused formatting arguments
17 }