fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.5 KiB68 linesraw
1warning: named argument `f` is not used by name
2  --> $DIR/issue-99907.rs:5:30
3   |
4LL |     println!("Hello {:.1}!", f = 0.02f32);
5   |                     -----    ^ this named argument is referred to by position in formatting string
6   |                     |
7   |                     this formatting argument uses named argument `f` by position
8   |
9   = note: `#[warn(named_arguments_used_positionally)]` on by default
10help: use the named argument by name to avoid ambiguity
11   |
12LL |     println!("Hello {f:.1}!", f = 0.02f32);
13   |                      +
14
15warning: named argument `f` is not used by name
16  --> $DIR/issue-99907.rs:9:31
17   |
18LL |     println!("Hello {:1.1}!", f = 0.02f32);
19   |                     ------    ^ this named argument is referred to by position in formatting string
20   |                     |
21   |                     this formatting argument uses named argument `f` by position
22   |
23help: use the named argument by name to avoid ambiguity
24   |
25LL |     println!("Hello {f:1.1}!", f = 0.02f32);
26   |                      +
27
28warning: named argument `f` is not used by name
29  --> $DIR/issue-99907.rs:13:27
30   |
31LL |     println!("Hello {}!", f = 0.02f32);
32   |                     --    ^ this named argument is referred to by position in formatting string
33   |                     |
34   |                     this formatting argument uses named argument `f` by position
35   |
36help: use the named argument by name to avoid ambiguity
37   |
38LL |     println!("Hello {f}!", f = 0.02f32);
39   |                      +
40
41warning: named argument `f` is not used by name
42  --> $DIR/issue-99907.rs:17:28
43   |
44LL |     println!("Hello { }!", f = 0.02f32);
45   |                     ---    ^ this named argument is referred to by position in formatting string
46   |                     |
47   |                     this formatting argument uses named argument `f` by position
48   |
49help: use the named argument by name to avoid ambiguity
50   |
51LL |     println!("Hello {f}!", f = 0.02f32);
52   |                      +
53
54warning: named argument `f` is not used by name
55  --> $DIR/issue-99907.rs:21:29
56   |
57LL |     println!("Hello {  }!", f = 0.02f32);
58   |                     ----    ^ this named argument is referred to by position in formatting string
59   |                     |
60   |                     this formatting argument uses named argument `f` by position
61   |
62help: use the named argument by name to avoid ambiguity
63   |
64LL |     println!("Hello {f}!", f = 0.02f32);
65   |                      +
66
67warning: 5 warnings emitted
68