]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/issue-99907.rs
Auto merge of #99953 - cjgillot:in-path-always, r=petrochenkov
[rust.git] / src / test / ui / macros / issue-99907.rs
1 // check-pass
2 // run-rustfix
3
4 fn main() {
5     println!("Hello {:.1}!", f = 0.02f32);
6     //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
7     //~| HELP use the named argument by name to avoid ambiguity
8
9     println!("Hello {:1.1}!", f = 0.02f32);
10     //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
11     //~| HELP use the named argument by name to avoid ambiguity
12
13     println!("Hello {}!", f = 0.02f32);
14     //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
15     //~| HELP use the named argument by name to avoid ambiguity
16
17     println!("Hello { }!", f = 0.02f32);
18     //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
19     //~| HELP use the named argument by name to avoid ambiguity
20
21     println!("Hello {  }!", f = 0.02f32);
22     //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
23     //~| HELP use the named argument by name to avoid ambiguity
24 }