]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/uninlined_format_args.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / uninlined_format_args.stderr
CommitLineData
2b03887a 1error: variables can be used directly in the `format!` string
487cf647 2 --> $DIR/uninlined_format_args.rs:40:5
2b03887a
FG
3 |
4LL | println!("val='{}'", local_i32);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
8help: change this to
9 |
10LL - println!("val='{}'", local_i32);
11LL + println!("val='{local_i32}'");
12 |
13
14error: variables can be used directly in the `format!` string
487cf647 15 --> $DIR/uninlined_format_args.rs:41:5
2b03887a
FG
16 |
17LL | println!("val='{ }'", local_i32); // 3 spaces
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20help: change this to
21 |
22LL - println!("val='{ }'", local_i32); // 3 spaces
23LL + println!("val='{local_i32}'"); // 3 spaces
24 |
25
26error: variables can be used directly in the `format!` string
487cf647 27 --> $DIR/uninlined_format_args.rs:42:5
2b03887a
FG
28 |
29LL | println!("val='{ }'", local_i32); // tab
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 |
32help: change this to
33 |
34LL - println!("val='{ }'", local_i32); // tab
35LL + println!("val='{local_i32}'"); // tab
36 |
37
38error: variables can be used directly in the `format!` string
487cf647 39 --> $DIR/uninlined_format_args.rs:43:5
2b03887a
FG
40 |
41LL | println!("val='{ }'", local_i32); // space+tab
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 |
44help: change this to
45 |
46LL - println!("val='{ }'", local_i32); // space+tab
47LL + println!("val='{local_i32}'"); // space+tab
48 |
49
50error: variables can be used directly in the `format!` string
487cf647 51 --> $DIR/uninlined_format_args.rs:44:5
2b03887a
FG
52 |
53LL | println!("val='{ }'", local_i32); // tab+space
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55 |
56help: change this to
57 |
58LL - println!("val='{ }'", local_i32); // tab+space
59LL + println!("val='{local_i32}'"); // tab+space
60 |
61
62error: variables can be used directly in the `format!` string
487cf647
FG
63 --> $DIR/uninlined_format_args.rs:45:5
64 |
65LL | / println!(
66LL | | "val='{
67LL | | }'",
68LL | | local_i32
69LL | | );
70 | |_____^
71
72error: variables can be used directly in the `format!` string
73 --> $DIR/uninlined_format_args.rs:50:5
2b03887a
FG
74 |
75LL | println!("{}", local_i32);
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^
77 |
78help: change this to
79 |
80LL - println!("{}", local_i32);
81LL + println!("{local_i32}");
82 |
83
84error: variables can be used directly in the `format!` string
487cf647 85 --> $DIR/uninlined_format_args.rs:51:5
2b03887a
FG
86 |
87LL | println!("{}", fn_arg);
88 | ^^^^^^^^^^^^^^^^^^^^^^
89 |
90help: change this to
91 |
92LL - println!("{}", fn_arg);
93LL + println!("{fn_arg}");
94 |
95
96error: variables can be used directly in the `format!` string
487cf647 97 --> $DIR/uninlined_format_args.rs:52:5
2b03887a
FG
98 |
99LL | println!("{:?}", local_i32);
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
101 |
102help: change this to
103 |
104LL - println!("{:?}", local_i32);
105LL + println!("{local_i32:?}");
106 |
107
108error: variables can be used directly in the `format!` string
487cf647 109 --> $DIR/uninlined_format_args.rs:53:5
2b03887a
FG
110 |
111LL | println!("{:#?}", local_i32);
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113 |
114help: change this to
115 |
116LL - println!("{:#?}", local_i32);
117LL + println!("{local_i32:#?}");
118 |
119
120error: variables can be used directly in the `format!` string
487cf647 121 --> $DIR/uninlined_format_args.rs:54:5
2b03887a
FG
122 |
123LL | println!("{:4}", local_i32);
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
125 |
126help: change this to
127 |
128LL - println!("{:4}", local_i32);
129LL + println!("{local_i32:4}");
130 |
131
132error: variables can be used directly in the `format!` string
487cf647 133 --> $DIR/uninlined_format_args.rs:55:5
2b03887a
FG
134 |
135LL | println!("{:04}", local_i32);
136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137 |
138help: change this to
139 |
140LL - println!("{:04}", local_i32);
141LL + println!("{local_i32:04}");
142 |
143
144error: variables can be used directly in the `format!` string
487cf647 145 --> $DIR/uninlined_format_args.rs:56:5
2b03887a
FG
146 |
147LL | println!("{:<3}", local_i32);
148 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149 |
150help: change this to
151 |
152LL - println!("{:<3}", local_i32);
153LL + println!("{local_i32:<3}");
154 |
155
156error: variables can be used directly in the `format!` string
487cf647 157 --> $DIR/uninlined_format_args.rs:57:5
2b03887a
FG
158 |
159LL | println!("{:#010x}", local_i32);
160 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161 |
162help: change this to
163 |
164LL - println!("{:#010x}", local_i32);
165LL + println!("{local_i32:#010x}");
166 |
167
168error: variables can be used directly in the `format!` string
487cf647 169 --> $DIR/uninlined_format_args.rs:58:5
2b03887a
FG
170 |
171LL | println!("{:.1}", local_f64);
172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173 |
174help: change this to
175 |
176LL - println!("{:.1}", local_f64);
177LL + println!("{local_f64:.1}");
178 |
179
2b03887a
FG
180error: variables can be used directly in the `format!` string
181 --> $DIR/uninlined_format_args.rs:62:5
182 |
2b03887a
FG
183LL | println!("{} {}", local_i32, local_f64);
184 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
185 |
186help: change this to
187 |
188LL - println!("{} {}", local_i32, local_f64);
189LL + println!("{local_i32} {local_f64}");
190 |
191
192error: variables can be used directly in the `format!` string
193 --> $DIR/uninlined_format_args.rs:64:5
194 |
2b03887a
FG
195LL | println!("{}", val);
196 | ^^^^^^^^^^^^^^^^^^^
197 |
198help: change this to
199 |
200LL - println!("{}", val);
201LL + println!("{val}");
202 |
203
204error: variables can be used directly in the `format!` string
487cf647 205 --> $DIR/uninlined_format_args.rs:65:5
2b03887a
FG
206 |
207LL | println!("{}", v = val);
208 | ^^^^^^^^^^^^^^^^^^^^^^^
209 |
210help: change this to
211 |
212LL - println!("{}", v = val);
213LL + println!("{val}");
214 |
215
216error: variables can be used directly in the `format!` string
487cf647 217 --> $DIR/uninlined_format_args.rs:67:5
2b03887a
FG
218 |
219LL | println!("val='{/t }'", local_i32);
220 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221 |
222help: change this to
223 |
224LL - println!("val='{/t }'", local_i32);
225LL + println!("val='{local_i32}'");
226 |
227
228error: variables can be used directly in the `format!` string
487cf647 229 --> $DIR/uninlined_format_args.rs:68:5
2b03887a
FG
230 |
231LL | println!("val='{/n }'", local_i32);
232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
233 |
234help: change this to
235 |
236LL - println!("val='{/n }'", local_i32);
237LL + println!("val='{local_i32}'");
238 |
239
240error: variables can be used directly in the `format!` string
487cf647 241 --> $DIR/uninlined_format_args.rs:69:5
2b03887a
FG
242 |
243LL | println!("val='{local_i32}'", local_i32 = local_i32);
244 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |
246help: change this to
247 |
248LL - println!("val='{local_i32}'", local_i32 = local_i32);
249LL + println!("val='{local_i32}'");
250 |
251
252error: variables can be used directly in the `format!` string
487cf647 253 --> $DIR/uninlined_format_args.rs:70:5
2b03887a
FG
254 |
255LL | println!("val='{local_i32}'", local_i32 = fn_arg);
256 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257 |
258help: change this to
259 |
260LL - println!("val='{local_i32}'", local_i32 = fn_arg);
261LL + println!("val='{fn_arg}'");
262 |
263
264error: variables can be used directly in the `format!` string
487cf647 265 --> $DIR/uninlined_format_args.rs:71:5
2b03887a
FG
266 |
267LL | println!("{0}", local_i32);
268 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
269 |
270help: change this to
271 |
272LL - println!("{0}", local_i32);
273LL + println!("{local_i32}");
274 |
275
276error: variables can be used directly in the `format!` string
487cf647 277 --> $DIR/uninlined_format_args.rs:72:5
2b03887a
FG
278 |
279LL | println!("{0:?}", local_i32);
280 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281 |
282help: change this to
283 |
284LL - println!("{0:?}", local_i32);
285LL + println!("{local_i32:?}");
286 |
287
288error: variables can be used directly in the `format!` string
487cf647 289 --> $DIR/uninlined_format_args.rs:73:5
2b03887a
FG
290 |
291LL | println!("{0:#?}", local_i32);
292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
293 |
294help: change this to
295 |
296LL - println!("{0:#?}", local_i32);
297LL + println!("{local_i32:#?}");
298 |
299
300error: variables can be used directly in the `format!` string
487cf647 301 --> $DIR/uninlined_format_args.rs:74:5
2b03887a
FG
302 |
303LL | println!("{0:04}", local_i32);
304 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
305 |
306help: change this to
307 |
308LL - println!("{0:04}", local_i32);
309LL + println!("{local_i32:04}");
310 |
311
312error: variables can be used directly in the `format!` string
487cf647 313 --> $DIR/uninlined_format_args.rs:75:5
2b03887a
FG
314 |
315LL | println!("{0:<3}", local_i32);
316 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317 |
318help: change this to
319 |
320LL - println!("{0:<3}", local_i32);
321LL + println!("{local_i32:<3}");
322 |
323
324error: variables can be used directly in the `format!` string
487cf647 325 --> $DIR/uninlined_format_args.rs:76:5
2b03887a
FG
326 |
327LL | println!("{0:#010x}", local_i32);
328 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
329 |
330help: change this to
331 |
332LL - println!("{0:#010x}", local_i32);
333LL + println!("{local_i32:#010x}");
334 |
335
336error: variables can be used directly in the `format!` string
487cf647 337 --> $DIR/uninlined_format_args.rs:77:5
2b03887a
FG
338 |
339LL | println!("{0:.1}", local_f64);
340 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
341 |
342help: change this to
343 |
344LL - println!("{0:.1}", local_f64);
345LL + println!("{local_f64:.1}");
346 |
347
348error: variables can be used directly in the `format!` string
487cf647 349 --> $DIR/uninlined_format_args.rs:78:5
2b03887a
FG
350 |
351LL | println!("{0} {0}", local_i32);
352 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
353 |
354help: change this to
355 |
356LL - println!("{0} {0}", local_i32);
357LL + println!("{local_i32} {local_i32}");
358 |
359
360error: variables can be used directly in the `format!` string
487cf647 361 --> $DIR/uninlined_format_args.rs:79:5
2b03887a
FG
362 |
363LL | println!("{1} {} {0} {}", local_i32, local_f64);
364 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
365 |
366help: change this to
367 |
368LL - println!("{1} {} {0} {}", local_i32, local_f64);
369LL + println!("{local_f64} {local_i32} {local_i32} {local_f64}");
370 |
371
372error: variables can be used directly in the `format!` string
487cf647 373 --> $DIR/uninlined_format_args.rs:80:5
2b03887a
FG
374 |
375LL | println!("{0} {1}", local_i32, local_f64);
376 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
377 |
378help: change this to
379 |
380LL - println!("{0} {1}", local_i32, local_f64);
381LL + println!("{local_i32} {local_f64}");
382 |
383
384error: variables can be used directly in the `format!` string
487cf647 385 --> $DIR/uninlined_format_args.rs:81:5
2b03887a
FG
386 |
387LL | println!("{1} {0}", local_i32, local_f64);
388 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
389 |
390help: change this to
391 |
392LL - println!("{1} {0}", local_i32, local_f64);
393LL + println!("{local_f64} {local_i32}");
394 |
395
396error: variables can be used directly in the `format!` string
487cf647 397 --> $DIR/uninlined_format_args.rs:82:5
2b03887a
FG
398 |
399LL | println!("{1} {0} {1} {0}", local_i32, local_f64);
400 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
401 |
402help: change this to
403 |
404LL - println!("{1} {0} {1} {0}", local_i32, local_f64);
405LL + println!("{local_f64} {local_i32} {local_f64} {local_i32}");
406 |
407
408error: variables can be used directly in the `format!` string
487cf647 409 --> $DIR/uninlined_format_args.rs:84:5
2b03887a
FG
410 |
411LL | println!("{v}", v = local_i32);
412 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
413 |
414help: change this to
415 |
416LL - println!("{v}", v = local_i32);
417LL + println!("{local_i32}");
418 |
419
420error: variables can be used directly in the `format!` string
487cf647 421 --> $DIR/uninlined_format_args.rs:85:5
2b03887a
FG
422 |
423LL | println!("{local_i32:0$}", width);
424 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
425 |
426help: change this to
427 |
428LL - println!("{local_i32:0$}", width);
429LL + println!("{local_i32:width$}");
430 |
431
432error: variables can be used directly in the `format!` string
487cf647 433 --> $DIR/uninlined_format_args.rs:86:5
2b03887a
FG
434 |
435LL | println!("{local_i32:w$}", w = width);
436 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
437 |
438help: change this to
439 |
440LL - println!("{local_i32:w$}", w = width);
441LL + println!("{local_i32:width$}");
442 |
443
444error: variables can be used directly in the `format!` string
487cf647 445 --> $DIR/uninlined_format_args.rs:87:5
2b03887a
FG
446 |
447LL | println!("{local_i32:.0$}", prec);
448 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
449 |
450help: change this to
451 |
452LL - println!("{local_i32:.0$}", prec);
453LL + println!("{local_i32:.prec$}");
454 |
455
456error: variables can be used directly in the `format!` string
487cf647 457 --> $DIR/uninlined_format_args.rs:88:5
2b03887a
FG
458 |
459LL | println!("{local_i32:.p$}", p = prec);
460 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
461 |
462help: change this to
463 |
464LL - println!("{local_i32:.p$}", p = prec);
465LL + println!("{local_i32:.prec$}");
466 |
467
468error: variables can be used directly in the `format!` string
487cf647 469 --> $DIR/uninlined_format_args.rs:89:5
2b03887a
FG
470 |
471LL | println!("{:0$}", v = val);
472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
473 |
474help: change this to
475 |
476LL - println!("{:0$}", v = val);
477LL + println!("{val:val$}");
478 |
479
480error: variables can be used directly in the `format!` string
487cf647 481 --> $DIR/uninlined_format_args.rs:90:5
2b03887a
FG
482 |
483LL | println!("{0:0$}", v = val);
484 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
485 |
486help: change this to
487 |
488LL - println!("{0:0$}", v = val);
489LL + println!("{val:val$}");
490 |
491
492error: variables can be used directly in the `format!` string
487cf647 493 --> $DIR/uninlined_format_args.rs:91:5
2b03887a
FG
494 |
495LL | println!("{:0$.0$}", v = val);
496 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
497 |
498help: change this to
499 |
500LL - println!("{:0$.0$}", v = val);
501LL + println!("{val:val$.val$}");
502 |
503
504error: variables can be used directly in the `format!` string
487cf647 505 --> $DIR/uninlined_format_args.rs:92:5
2b03887a
FG
506 |
507LL | println!("{0:0$.0$}", v = val);
508 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
509 |
510help: change this to
511 |
512LL - println!("{0:0$.0$}", v = val);
513LL + println!("{val:val$.val$}");
514 |
515
516error: variables can be used directly in the `format!` string
487cf647 517 --> $DIR/uninlined_format_args.rs:93:5
2b03887a
FG
518 |
519LL | println!("{0:0$.v$}", v = val);
520 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
521 |
522help: change this to
523 |
524LL - println!("{0:0$.v$}", v = val);
525LL + println!("{val:val$.val$}");
526 |
527
528error: variables can be used directly in the `format!` string
487cf647 529 --> $DIR/uninlined_format_args.rs:94:5
2b03887a
FG
530 |
531LL | println!("{0:v$.0$}", v = val);
532 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
533 |
534help: change this to
535 |
536LL - println!("{0:v$.0$}", v = val);
537LL + println!("{val:val$.val$}");
538 |
539
540error: variables can be used directly in the `format!` string
487cf647 541 --> $DIR/uninlined_format_args.rs:95:5
2b03887a
FG
542 |
543LL | println!("{v:0$.0$}", v = val);
544 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
545 |
546help: change this to
547 |
548LL - println!("{v:0$.0$}", v = val);
549LL + println!("{val:val$.val$}");
550 |
551
552error: variables can be used directly in the `format!` string
487cf647 553 --> $DIR/uninlined_format_args.rs:96:5
2b03887a
FG
554 |
555LL | println!("{v:v$.0$}", v = val);
556 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
557 |
558help: change this to
559 |
560LL - println!("{v:v$.0$}", v = val);
561LL + println!("{val:val$.val$}");
562 |
563
564error: variables can be used directly in the `format!` string
487cf647 565 --> $DIR/uninlined_format_args.rs:97:5
2b03887a
FG
566 |
567LL | println!("{v:0$.v$}", v = val);
568 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
569 |
570help: change this to
571 |
572LL - println!("{v:0$.v$}", v = val);
573LL + println!("{val:val$.val$}");
574 |
575
576error: variables can be used directly in the `format!` string
487cf647 577 --> $DIR/uninlined_format_args.rs:98:5
2b03887a
FG
578 |
579LL | println!("{v:v$.v$}", v = val);
580 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
581 |
582help: change this to
583 |
584LL - println!("{v:v$.v$}", v = val);
585LL + println!("{val:val$.val$}");
586 |
587
588error: variables can be used directly in the `format!` string
487cf647 589 --> $DIR/uninlined_format_args.rs:99:5
2b03887a
FG
590 |
591LL | println!("{:0$}", width);
592 | ^^^^^^^^^^^^^^^^^^^^^^^^
593 |
594help: change this to
595 |
596LL - println!("{:0$}", width);
597LL + println!("{width:width$}");
598 |
599
600error: variables can be used directly in the `format!` string
487cf647 601 --> $DIR/uninlined_format_args.rs:100:5
2b03887a
FG
602 |
603LL | println!("{:1$}", local_i32, width);
604 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
605 |
606help: change this to
607 |
608LL - println!("{:1$}", local_i32, width);
609LL + println!("{local_i32:width$}");
610 |
611
612error: variables can be used directly in the `format!` string
487cf647 613 --> $DIR/uninlined_format_args.rs:101:5
2b03887a
FG
614 |
615LL | println!("{:w$}", w = width);
616 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
617 |
618help: change this to
619 |
620LL - println!("{:w$}", w = width);
621LL + println!("{width:width$}");
622 |
623
624error: variables can be used directly in the `format!` string
487cf647 625 --> $DIR/uninlined_format_args.rs:102:5
2b03887a
FG
626 |
627LL | println!("{:w$}", local_i32, w = width);
628 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
629 |
630help: change this to
631 |
632LL - println!("{:w$}", local_i32, w = width);
633LL + println!("{local_i32:width$}");
634 |
635
636error: variables can be used directly in the `format!` string
487cf647 637 --> $DIR/uninlined_format_args.rs:103:5
2b03887a
FG
638 |
639LL | println!("{:.0$}", prec);
640 | ^^^^^^^^^^^^^^^^^^^^^^^^
641 |
642help: change this to
643 |
644LL - println!("{:.0$}", prec);
645LL + println!("{prec:.prec$}");
646 |
647
648error: variables can be used directly in the `format!` string
487cf647 649 --> $DIR/uninlined_format_args.rs:104:5
2b03887a
FG
650 |
651LL | println!("{:.1$}", local_i32, prec);
652 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
653 |
654help: change this to
655 |
656LL - println!("{:.1$}", local_i32, prec);
657LL + println!("{local_i32:.prec$}");
658 |
659
660error: variables can be used directly in the `format!` string
487cf647 661 --> $DIR/uninlined_format_args.rs:105:5
2b03887a
FG
662 |
663LL | println!("{:.p$}", p = prec);
664 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
665 |
666help: change this to
667 |
668LL - println!("{:.p$}", p = prec);
669LL + println!("{prec:.prec$}");
670 |
671
672error: variables can be used directly in the `format!` string
487cf647 673 --> $DIR/uninlined_format_args.rs:106:5
2b03887a
FG
674 |
675LL | println!("{:.p$}", local_i32, p = prec);
676 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
677 |
678help: change this to
679 |
680LL - println!("{:.p$}", local_i32, p = prec);
681LL + println!("{local_i32:.prec$}");
682 |
683
684error: variables can be used directly in the `format!` string
487cf647 685 --> $DIR/uninlined_format_args.rs:107:5
2b03887a
FG
686 |
687LL | println!("{:0$.1$}", width, prec);
688 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
689 |
690help: change this to
691 |
692LL - println!("{:0$.1$}", width, prec);
693LL + println!("{width:width$.prec$}");
694 |
695
696error: variables can be used directly in the `format!` string
487cf647 697 --> $DIR/uninlined_format_args.rs:108:5
2b03887a
FG
698 |
699LL | println!("{:0$.w$}", width, w = prec);
700 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
701 |
702help: change this to
703 |
704LL - println!("{:0$.w$}", width, w = prec);
705LL + println!("{width:width$.prec$}");
706 |
707
708error: variables can be used directly in the `format!` string
487cf647 709 --> $DIR/uninlined_format_args.rs:109:5
2b03887a
FG
710 |
711LL | println!("{:1$.2$}", local_f64, width, prec);
712 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
713 |
714help: change this to
715 |
716LL - println!("{:1$.2$}", local_f64, width, prec);
717LL + println!("{local_f64:width$.prec$}");
718 |
719
720error: variables can be used directly in the `format!` string
487cf647 721 --> $DIR/uninlined_format_args.rs:110:5
2b03887a
FG
722 |
723LL | println!("{:1$.2$} {0} {1} {2}", local_f64, width, prec);
724 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
725 |
726help: change this to
727 |
728LL - println!("{:1$.2$} {0} {1} {2}", local_f64, width, prec);
729LL + println!("{local_f64:width$.prec$} {local_f64} {width} {prec}");
730 |
731
732error: variables can be used directly in the `format!` string
487cf647
FG
733 --> $DIR/uninlined_format_args.rs:111:5
734 |
735LL | / println!(
736LL | | "{0:1$.2$} {0:2$.1$} {1:0$.2$} {1:2$.0$} {2:0$.1$} {2:1$.0$}",
737LL | | local_i32, width, prec,
738LL | | );
739 | |_____^
740
741error: variables can be used directly in the `format!` string
742 --> $DIR/uninlined_format_args.rs:122:5
2b03887a
FG
743 |
744LL | println!("Width = {}, value with width = {:0$}", local_i32, local_f64);
745 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
746 |
747help: change this to
748 |
749LL - println!("Width = {}, value with width = {:0$}", local_i32, local_f64);
750LL + println!("Width = {local_i32}, value with width = {local_f64:local_i32$}");
751 |
752
753error: variables can be used directly in the `format!` string
487cf647 754 --> $DIR/uninlined_format_args.rs:123:5
2b03887a
FG
755 |
756LL | println!("{:w$.p$}", local_i32, w = width, p = prec);
757 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
758 |
759help: change this to
760 |
761LL - println!("{:w$.p$}", local_i32, w = width, p = prec);
762LL + println!("{local_i32:width$.prec$}");
763 |
764
765error: variables can be used directly in the `format!` string
487cf647 766 --> $DIR/uninlined_format_args.rs:124:5
2b03887a
FG
767 |
768LL | println!("{:w$.p$}", w = width, p = prec);
769 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
770 |
771help: change this to
772 |
773LL - println!("{:w$.p$}", w = width, p = prec);
774LL + println!("{width:width$.prec$}");
775 |
776
777error: variables can be used directly in the `format!` string
487cf647 778 --> $DIR/uninlined_format_args.rs:125:20
2b03887a
FG
779 |
780LL | println!("{}", format!("{}", local_i32));
781 | ^^^^^^^^^^^^^^^^^^^^^^^^
782 |
783help: change this to
784 |
785LL - println!("{}", format!("{}", local_i32));
786LL + println!("{}", format!("{local_i32}"));
787 |
788
789error: variables can be used directly in the `format!` string
487cf647
FG
790 --> $DIR/uninlined_format_args.rs:143:5
791 |
792LL | / println!(
793LL | | "{}",
794LL | | // comment with a comma , in it
795LL | | val,
796LL | | );
797 | |_____^
798
799error: variables can be used directly in the `format!` string
800 --> $DIR/uninlined_format_args.rs:148:5
2b03887a
FG
801 |
802LL | println!("{}", /* comment with a comma , in it */ val);
803 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
804 |
805help: change this to
806 |
807LL - println!("{}", /* comment with a comma , in it */ val);
808LL + println!("{val}");
809 |
810
811error: variables can be used directly in the `format!` string
487cf647 812 --> $DIR/uninlined_format_args.rs:154:9
2b03887a
FG
813 |
814LL | panic!("p1 {}", local_i32);
815 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
816 |
817help: change this to
818 |
819LL - panic!("p1 {}", local_i32);
820LL + panic!("p1 {local_i32}");
821 |
822
823error: variables can be used directly in the `format!` string
487cf647 824 --> $DIR/uninlined_format_args.rs:157:9
2b03887a
FG
825 |
826LL | panic!("p2 {0}", local_i32);
827 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
828 |
829help: change this to
830 |
831LL - panic!("p2 {0}", local_i32);
832LL + panic!("p2 {local_i32}");
833 |
834
835error: variables can be used directly in the `format!` string
487cf647 836 --> $DIR/uninlined_format_args.rs:160:9
2b03887a
FG
837 |
838LL | panic!("p3 {local_i32}", local_i32 = local_i32);
839 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
840 |
841help: change this to
842 |
843LL - panic!("p3 {local_i32}", local_i32 = local_i32);
844LL + panic!("p3 {local_i32}");
845 |
846
847error: variables can be used directly in the `format!` string
487cf647 848 --> $DIR/uninlined_format_args.rs:180:5
2b03887a
FG
849 |
850LL | println!("expand='{}'", local_i32);
851 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
852 |
853help: change this to
854 |
855LL - println!("expand='{}'", local_i32);
856LL + println!("expand='{local_i32}'");
857 |
858
487cf647 859error: aborting due to 72 previous errors
2b03887a 860