fork/rust

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

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

master
21.0 KiB562 linesraw
1warning: named argument `a` is not used by name
2  --> $DIR/issue-99265.rs:5:24
3   |
4LL |     println!("{b} {}", a=1, b=2);
5   |                   --   ^ this named argument is referred to by position in formatting string
6   |                   |
7   |                   this formatting argument uses named argument `a` 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!("{b} {a}", a=1, b=2);
13   |                    +
14
15warning: named argument `a` is not used by name
16  --> $DIR/issue-99265.rs:9:35
17   |
18LL |     println!("{} {} {} {} {}", 0, a=1, b=2, c=3, d=4);
19   |                  --               ^ this named argument is referred to by position in formatting string
20   |                  |
21   |                  this formatting argument uses named argument `a` by position
22   |
23help: use the named argument by name to avoid ambiguity
24   |
25LL |     println!("{} {a} {} {} {}", 0, a=1, b=2, c=3, d=4);
26   |                   +
27
28warning: named argument `b` is not used by name
29  --> $DIR/issue-99265.rs:9:40
30   |
31LL |     println!("{} {} {} {} {}", 0, a=1, b=2, c=3, d=4);
32   |                     --                 ^ this named argument is referred to by position in formatting string
33   |                     |
34   |                     this formatting argument uses named argument `b` by position
35   |
36help: use the named argument by name to avoid ambiguity
37   |
38LL |     println!("{} {} {b} {} {}", 0, a=1, b=2, c=3, d=4);
39   |                      +
40
41warning: named argument `c` is not used by name
42  --> $DIR/issue-99265.rs:9:45
43   |
44LL |     println!("{} {} {} {} {}", 0, a=1, b=2, c=3, d=4);
45   |                        --                   ^ this named argument is referred to by position in formatting string
46   |                        |
47   |                        this formatting argument uses named argument `c` by position
48   |
49help: use the named argument by name to avoid ambiguity
50   |
51LL |     println!("{} {} {} {c} {}", 0, a=1, b=2, c=3, d=4);
52   |                         +
53
54warning: named argument `d` is not used by name
55  --> $DIR/issue-99265.rs:9:50
56   |
57LL |     println!("{} {} {} {} {}", 0, a=1, b=2, c=3, d=4);
58   |                           --                     ^ this named argument is referred to by position in formatting string
59   |                           |
60   |                           this formatting argument uses named argument `d` by position
61   |
62help: use the named argument by name to avoid ambiguity
63   |
64LL |     println!("{} {} {} {} {d}", 0, a=1, b=2, c=3, d=4);
65   |                            +
66
67warning: named argument `width` is not used by name
68  --> $DIR/issue-99265.rs:19:35
69   |
70LL |     println!("Hello {:1$}!", "x", width = 5);
71   |                       --          ^^^^^ this named argument is referred to by position in formatting string
72   |                       |
73   |                       this formatting argument uses named argument `width` by position
74   |
75help: use the named argument by name to avoid ambiguity
76   |
77LL |     println!("Hello {:width$}!", "x", width = 5);
78   |                       ~~~~~~
79
80warning: named argument `f` is not used by name
81  --> $DIR/issue-99265.rs:23:33
82   |
83LL |     println!("Hello {:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
84   |                     --------    ^ this named argument is referred to by position in formatting string
85   |                     |
86   |                     this formatting argument uses named argument `f` by position
87   |
88help: use the named argument by name to avoid ambiguity
89   |
90LL |     println!("Hello {f:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
91   |                      +
92
93warning: named argument `precision` is not used by name
94  --> $DIR/issue-99265.rs:23:57
95   |
96LL |     println!("Hello {:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
97   |                          --                             ^^^^^^^^^ this named argument is referred to by position in formatting string
98   |                          |
99   |                          this formatting argument uses named argument `precision` by position
100   |
101help: use the named argument by name to avoid ambiguity
102   |
103LL |     println!("Hello {:1$.precision$}!", f = 0.02f32, width = 5, precision = 2);
104   |                          ~~~~~~~~~~
105
106warning: named argument `width` is not used by name
107  --> $DIR/issue-99265.rs:23:46
108   |
109LL |     println!("Hello {:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
110   |                       --                     ^^^^^ this named argument is referred to by position in formatting string
111   |                       |
112   |                       this formatting argument uses named argument `width` by position
113   |
114help: use the named argument by name to avoid ambiguity
115   |
116LL |     println!("Hello {:width$.2$}!", f = 0.02f32, width = 5, precision = 2);
117   |                       ~~~~~~
118
119warning: named argument `f` is not used by name
120  --> $DIR/issue-99265.rs:31:34
121   |
122LL |     println!("Hello {0:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
123   |                     ---------    ^ this named argument is referred to by position in formatting string
124   |                     |
125   |                     this formatting argument uses named argument `f` by position
126   |
127help: use the named argument by name to avoid ambiguity
128   |
129LL |     println!("Hello {f:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
130   |                      ~
131
132warning: named argument `precision` is not used by name
133  --> $DIR/issue-99265.rs:31:58
134   |
135LL |     println!("Hello {0:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
136   |                           --                             ^^^^^^^^^ this named argument is referred to by position in formatting string
137   |                           |
138   |                           this formatting argument uses named argument `precision` by position
139   |
140help: use the named argument by name to avoid ambiguity
141   |
142LL |     println!("Hello {0:1$.precision$}!", f = 0.02f32, width = 5, precision = 2);
143   |                           ~~~~~~~~~~
144
145warning: named argument `width` is not used by name
146  --> $DIR/issue-99265.rs:31:47
147   |
148LL |     println!("Hello {0:1$.2$}!", f = 0.02f32, width = 5, precision = 2);
149   |                        --                     ^^^^^ this named argument is referred to by position in formatting string
150   |                        |
151   |                        this formatting argument uses named argument `width` by position
152   |
153help: use the named argument by name to avoid ambiguity
154   |
155LL |     println!("Hello {0:width$.2$}!", f = 0.02f32, width = 5, precision = 2);
156   |                        ~~~~~~
157
158warning: named argument `f` is not used by name
159  --> $DIR/issue-99265.rs:49:9
160   |
161LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
162   |                    --------- this formatting argument uses named argument `f` by position
163...
164LL |         f = 0.02f32,
165   |         ^ this named argument is referred to by position in formatting string
166   |
167help: use the named argument by name to avoid ambiguity
168   |
169LL |         "{}, Hello {f:2$.3$} {4:5$.6$}! {1}",
170   |                     ~
171
172warning: named argument `precision` is not used by name
173  --> $DIR/issue-99265.rs:54:9
174   |
175LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
176   |                          -- this formatting argument uses named argument `precision` by position
177...
178LL |         precision = 2,
179   |         ^^^^^^^^^ this named argument is referred to by position in formatting string
180   |
181help: use the named argument by name to avoid ambiguity
182   |
183LL |         "{}, Hello {1:2$.precision$} {4:5$.6$}! {1}",
184   |                          ~~~~~~~~~~
185
186warning: named argument `width` is not used by name
187  --> $DIR/issue-99265.rs:52:9
188   |
189LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
190   |                       -- this formatting argument uses named argument `width` by position
191...
192LL |         width = 5,
193   |         ^^^^^ this named argument is referred to by position in formatting string
194   |
195help: use the named argument by name to avoid ambiguity
196   |
197LL |         "{}, Hello {1:width$.3$} {4:5$.6$}! {1}",
198   |                       ~~~~~~
199
200warning: named argument `g` is not used by name
201  --> $DIR/issue-99265.rs:56:9
202   |
203LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
204   |                              --------- this formatting argument uses named argument `g` by position
205...
206LL |         g = 0.02f32,
207   |         ^ this named argument is referred to by position in formatting string
208   |
209help: use the named argument by name to avoid ambiguity
210   |
211LL |         "{}, Hello {1:2$.3$} {g:5$.6$}! {1}",
212   |                               ~
213
214warning: named argument `precision2` is not used by name
215  --> $DIR/issue-99265.rs:60:9
216   |
217LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
218   |                                    -- this formatting argument uses named argument `precision2` by position
219...
220LL |         precision2 = 2
221   |         ^^^^^^^^^^ this named argument is referred to by position in formatting string
222   |
223help: use the named argument by name to avoid ambiguity
224   |
225LL |         "{}, Hello {1:2$.3$} {4:5$.precision2$}! {1}",
226   |                                    ~~~~~~~~~~~
227
228warning: named argument `width2` is not used by name
229  --> $DIR/issue-99265.rs:58:9
230   |
231LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
232   |                                 -- this formatting argument uses named argument `width2` by position
233...
234LL |         width2 = 5,
235   |         ^^^^^^ this named argument is referred to by position in formatting string
236   |
237help: use the named argument by name to avoid ambiguity
238   |
239LL |         "{}, Hello {1:2$.3$} {4:width2$.6$}! {1}",
240   |                                 ~~~~~~~
241
242warning: named argument `f` is not used by name
243  --> $DIR/issue-99265.rs:49:9
244   |
245LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {1}",
246   |                                         --- this formatting argument uses named argument `f` by position
247...
248LL |         f = 0.02f32,
249   |         ^ this named argument is referred to by position in formatting string
250   |
251help: use the named argument by name to avoid ambiguity
252   |
253LL |         "{}, Hello {1:2$.3$} {4:5$.6$}! {f}",
254   |                                          ~
255
256warning: named argument `f` is not used by name
257  --> $DIR/issue-99265.rs:64:31
258   |
259LL |     println!("Hello {:0.1}!", f = 0.02f32);
260   |                     ------    ^ this named argument is referred to by position in formatting string
261   |                     |
262   |                     this formatting argument uses named argument `f` by position
263   |
264help: use the named argument by name to avoid ambiguity
265   |
266LL |     println!("Hello {f:0.1}!", f = 0.02f32);
267   |                      +
268
269warning: named argument `f` is not used by name
270  --> $DIR/issue-99265.rs:68:32
271   |
272LL |     println!("Hello {0:0.1}!", f = 0.02f32);
273   |                     -------    ^ this named argument is referred to by position in formatting string
274   |                     |
275   |                     this formatting argument uses named argument `f` by position
276   |
277help: use the named argument by name to avoid ambiguity
278   |
279LL |     println!("Hello {f:0.1}!", f = 0.02f32);
280   |                      ~
281
282warning: named argument `v` is not used by name
283  --> $DIR/issue-99265.rs:79:23
284   |
285LL |     println!("{:0$}", v = val);
286   |               -----   ^ this named argument is referred to by position in formatting string
287   |               |
288   |               this formatting argument uses named argument `v` by position
289   |
290help: use the named argument by name to avoid ambiguity
291   |
292LL |     println!("{v:0$}", v = val);
293   |                +
294
295warning: named argument `v` is not used by name
296  --> $DIR/issue-99265.rs:79:23
297   |
298LL |     println!("{:0$}", v = val);
299   |                 --    ^ this named argument is referred to by position in formatting string
300   |                 |
301   |                 this formatting argument uses named argument `v` by position
302   |
303help: use the named argument by name to avoid ambiguity
304   |
305LL |     println!("{:v$}", v = val);
306   |                 ~~
307
308warning: named argument `v` is not used by name
309  --> $DIR/issue-99265.rs:84:24
310   |
311LL |     println!("{0:0$}", v = val);
312   |               ------   ^ this named argument is referred to by position in formatting string
313   |               |
314   |               this formatting argument uses named argument `v` by position
315   |
316help: use the named argument by name to avoid ambiguity
317   |
318LL |     println!("{v:0$}", v = val);
319   |                ~
320
321warning: named argument `v` is not used by name
322  --> $DIR/issue-99265.rs:84:24
323   |
324LL |     println!("{0:0$}", v = val);
325   |                  --    ^ this named argument is referred to by position in formatting string
326   |                  |
327   |                  this formatting argument uses named argument `v` by position
328   |
329help: use the named argument by name to avoid ambiguity
330   |
331LL |     println!("{0:v$}", v = val);
332   |                  ~~
333
334warning: named argument `v` is not used by name
335  --> $DIR/issue-99265.rs:89:26
336   |
337LL |     println!("{:0$.0$}", v = val);
338   |               --------   ^ this named argument is referred to by position in formatting string
339   |               |
340   |               this formatting argument uses named argument `v` by position
341   |
342help: use the named argument by name to avoid ambiguity
343   |
344LL |     println!("{v:0$.0$}", v = val);
345   |                +
346
347warning: named argument `v` is not used by name
348  --> $DIR/issue-99265.rs:89:26
349   |
350LL |     println!("{:0$.0$}", v = val);
351   |                    --    ^ this named argument is referred to by position in formatting string
352   |                    |
353   |                    this formatting argument uses named argument `v` by position
354   |
355help: use the named argument by name to avoid ambiguity
356   |
357LL |     println!("{:0$.v$}", v = val);
358   |                    ~~
359
360warning: named argument `v` is not used by name
361  --> $DIR/issue-99265.rs:89:26
362   |
363LL |     println!("{:0$.0$}", v = val);
364   |                 --       ^ this named argument is referred to by position in formatting string
365   |                 |
366   |                 this formatting argument uses named argument `v` by position
367   |
368help: use the named argument by name to avoid ambiguity
369   |
370LL |     println!("{:v$.0$}", v = val);
371   |                 ~~
372
373warning: named argument `v` is not used by name
374  --> $DIR/issue-99265.rs:96:27
375   |
376LL |     println!("{0:0$.0$}", v = val);
377   |               ---------   ^ this named argument is referred to by position in formatting string
378   |               |
379   |               this formatting argument uses named argument `v` by position
380   |
381help: use the named argument by name to avoid ambiguity
382   |
383LL |     println!("{v:0$.0$}", v = val);
384   |                ~
385
386warning: named argument `v` is not used by name
387  --> $DIR/issue-99265.rs:96:27
388   |
389LL |     println!("{0:0$.0$}", v = val);
390   |                     --    ^ this named argument is referred to by position in formatting string
391   |                     |
392   |                     this formatting argument uses named argument `v` by position
393   |
394help: use the named argument by name to avoid ambiguity
395   |
396LL |     println!("{0:0$.v$}", v = val);
397   |                     ~~
398
399warning: named argument `v` is not used by name
400  --> $DIR/issue-99265.rs:96:27
401   |
402LL |     println!("{0:0$.0$}", v = val);
403   |                  --       ^ this named argument is referred to by position in formatting string
404   |                  |
405   |                  this formatting argument uses named argument `v` by position
406   |
407help: use the named argument by name to avoid ambiguity
408   |
409LL |     println!("{0:v$.0$}", v = val);
410   |                  ~~
411
412warning: named argument `a` is not used by name
413  --> $DIR/issue-99265.rs:104:28
414   |
415LL |     println!("{} {a} {0}", a = 1);
416   |               --           ^ this named argument is referred to by position in formatting string
417   |               |
418   |               this formatting argument uses named argument `a` by position
419   |
420help: use the named argument by name to avoid ambiguity
421   |
422LL |     println!("{a} {a} {0}", a = 1);
423   |                +
424
425warning: named argument `a` is not used by name
426  --> $DIR/issue-99265.rs:104:28
427   |
428LL |     println!("{} {a} {0}", a = 1);
429   |                      ---   ^ this named argument is referred to by position in formatting string
430   |                      |
431   |                      this formatting argument uses named argument `a` by position
432   |
433help: use the named argument by name to avoid ambiguity
434   |
435LL |     println!("{} {a} {a}", a = 1);
436   |                       ~
437
438warning: named argument `a` is not used by name
439  --> $DIR/issue-99265.rs:115:14
440   |
441LL |                 {:1$.2$}",
442   |                 -------- this formatting argument uses named argument `a` by position
443...
444LL |              a = 1.0, b = 1, c = 2,
445   |              ^ this named argument is referred to by position in formatting string
446   |
447help: use the named argument by name to avoid ambiguity
448   |
449LL |                 {a:1$.2$}",
450   |                  +
451
452warning: named argument `c` is not used by name
453  --> $DIR/issue-99265.rs:115:30
454   |
455LL |                 {:1$.2$}",
456   |                      -- this formatting argument uses named argument `c` by position
457...
458LL |              a = 1.0, b = 1, c = 2,
459   |                              ^ this named argument is referred to by position in formatting string
460   |
461help: use the named argument by name to avoid ambiguity
462   |
463LL |                 {:1$.c$}",
464   |                      ~~
465
466warning: named argument `b` is not used by name
467  --> $DIR/issue-99265.rs:115:23
468   |
469LL |                 {:1$.2$}",
470   |                   -- this formatting argument uses named argument `b` by position
471...
472LL |              a = 1.0, b = 1, c = 2,
473   |                       ^ this named argument is referred to by position in formatting string
474   |
475help: use the named argument by name to avoid ambiguity
476   |
477LL |                 {:b$.2$}",
478   |                   ~~
479
480warning: named argument `a` is not used by name
481  --> $DIR/issue-99265.rs:126:14
482   |
483LL |                 {0:1$.2$}",
484   |                 --------- this formatting argument uses named argument `a` by position
485...
486LL |              a = 1.0, b = 1, c = 2,
487   |              ^ this named argument is referred to by position in formatting string
488   |
489help: use the named argument by name to avoid ambiguity
490   |
491LL |                 {a:1$.2$}",
492   |                  ~
493
494warning: named argument `c` is not used by name
495  --> $DIR/issue-99265.rs:126:30
496   |
497LL |                 {0:1$.2$}",
498   |                       -- this formatting argument uses named argument `c` by position
499...
500LL |              a = 1.0, b = 1, c = 2,
501   |                              ^ this named argument is referred to by position in formatting string
502   |
503help: use the named argument by name to avoid ambiguity
504   |
505LL |                 {0:1$.c$}",
506   |                       ~~
507
508warning: named argument `b` is not used by name
509  --> $DIR/issue-99265.rs:126:23
510   |
511LL |                 {0:1$.2$}",
512   |                    -- this formatting argument uses named argument `b` by position
513...
514LL |              a = 1.0, b = 1, c = 2,
515   |                       ^ this named argument is referred to by position in formatting string
516   |
517help: use the named argument by name to avoid ambiguity
518   |
519LL |                 {0:b$.2$}",
520   |                    ~~
521
522warning: named argument `x` is not used by name
523  --> $DIR/issue-99265.rs:132:30
524   |
525LL |     println!("{{{:1$.2$}}}", x = 1.0, width = 3, precision = 2);
526   |                 --------     ^ this named argument is referred to by position in formatting string
527   |                 |
528   |                 this formatting argument uses named argument `x` by position
529   |
530help: use the named argument by name to avoid ambiguity
531   |
532LL |     println!("{{{x:1$.2$}}}", x = 1.0, width = 3, precision = 2);
533   |                  +
534
535warning: named argument `precision` is not used by name
536  --> $DIR/issue-99265.rs:132:50
537   |
538LL |     println!("{{{:1$.2$}}}", x = 1.0, width = 3, precision = 2);
539   |                      --                          ^^^^^^^^^ this named argument is referred to by position in formatting string
540   |                      |
541   |                      this formatting argument uses named argument `precision` by position
542   |
543help: use the named argument by name to avoid ambiguity
544   |
545LL |     println!("{{{:1$.precision$}}}", x = 1.0, width = 3, precision = 2);
546   |                      ~~~~~~~~~~
547
548warning: named argument `width` is not used by name
549  --> $DIR/issue-99265.rs:132:39
550   |
551LL |     println!("{{{:1$.2$}}}", x = 1.0, width = 3, precision = 2);
552   |                   --                  ^^^^^ this named argument is referred to by position in formatting string
553   |                   |
554   |                   this formatting argument uses named argument `width` by position
555   |
556help: use the named argument by name to avoid ambiguity
557   |
558LL |     println!("{{{:width$.2$}}}", x = 1.0, width = 3, precision = 2);
559   |                   ~~~~~~
560
561warning: 42 warnings emitted
562