|
1 | 1 | error: `format!` in `println!` args
|
2 |
| - --> $DIR/format_args.rs:11:5 |
| 2 | + --> $DIR/format_args.rs:19:5 |
3 | 3 | |
|
4 | 4 | LL | println!("error: {}", format!("something failed at {}", Location::caller()));
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `println!("error: something failed at {}", Location::caller())`
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::format-in-format-args` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: `format!` in `println!` args
|
10 |
| - --> $DIR/format_args.rs:12:5 |
| 10 | + --> $DIR/format_args.rs:20:5 |
11 | 11 | |
|
12 | 12 | LL | println!("{}: {}", error, format!("something failed at {}", Location::caller()));
|
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `println!("{}: something failed at {}", error, Location::caller())`
|
14 | 14 |
|
15 | 15 | error: `format!` in `println!` args
|
16 |
| - --> $DIR/format_args.rs:13:5 |
| 16 | + --> $DIR/format_args.rs:21:5 |
17 | 17 | |
|
18 | 18 | LL | println!("{:?}: {}", error, format!("something failed at {}", Location::caller()));
|
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `println!("{:?}: something failed at {}", error, Location::caller())`
|
20 | 20 |
|
21 | 21 | error: `format!` in `println!` args
|
22 |
| - --> $DIR/format_args.rs:14:5 |
| 22 | + --> $DIR/format_args.rs:22:5 |
| 23 | + | |
| 24 | +LL | println!("{{}}: {}", format!("something failed at {}", Location::caller())); |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `println!("{{}}: something failed at {}", Location::caller())` |
| 26 | + |
| 27 | +error: `format!` in `println!` args |
| 28 | + --> $DIR/format_args.rs:23:5 |
23 | 29 | |
|
24 | 30 | LL | println!(r#"error: "{}""#, format!("something failed at {}", Location::caller()));
|
25 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `println!(r#"error: "something failed at {}""#, Location::caller())`
|
26 | 32 |
|
27 | 33 | error: `format!` in `format!` args
|
28 |
| - --> $DIR/format_args.rs:17:13 |
| 34 | + --> $DIR/format_args.rs:26:13 |
29 | 35 | |
|
30 | 36 | LL | let _ = format!("error: {}", format!("something failed at {}", Location::caller()));
|
31 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: inline the `format!` call: `format!("error: something failed at {}", Location::caller())`
|
32 | 38 |
|
33 | 39 | error: `to_string` applied to a type that implements `Display` in `println!` args
|
34 |
| - --> $DIR/format_args.rs:18:65 |
| 40 | + --> $DIR/format_args.rs:27:65 |
35 | 41 | |
|
36 | 42 | LL | println!("error: something failed at {}", Location::caller().to_string());
|
37 | 43 | | ^^^^^^^^^^^^ help: remove this
|
38 | 44 | |
|
39 | 45 | = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
|
40 | 46 |
|
41 |
| -error: aborting due to 6 previous errors |
| 47 | +error: aborting due to 7 previous errors |
42 | 48 |
|
0 commit comments