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