]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/issue-99907.fixed
Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillot
[rust.git] / tests / ui / macros / issue-99907.fixed
1 // check-pass
2 // run-rustfix
3
4 fn main() {
5     println!("Hello {f:.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 {f: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}!", 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}!", 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}!", 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 }