blob: 9e0e1b80ee59fbb24fd3a2755a06ec54bcf74a0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// check-pass
// run-rustfix
fn main() {
println!("Hello {f:.1}!", f = 0.02f32);
//~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
//~| HELP use the named argument by name to avoid ambiguity
println!("Hello {f:1.1}!", f = 0.02f32);
//~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
//~| HELP use the named argument by name to avoid ambiguity
println!("Hello {f}!", f = 0.02f32);
//~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
//~| HELP use the named argument by name to avoid ambiguity
println!("Hello {f}!", f = 0.02f32);
//~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
//~| HELP use the named argument by name to avoid ambiguity
println!("Hello {f}!", f = 0.02f32);
//~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
//~| HELP use the named argument by name to avoid ambiguity
}
|