|
| 1 | +error: `format!` in `my_println2!` args |
| 2 | + --> $DIR/format_args_unfixable.rs:33:5 |
| 3 | + | |
| 4 | +LL | my_println2!(true, "error: {}", format!("something failed at {}", Location::caller())); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = help: combine the `format!(..)` arguments with the outer `my_println2!(..)` call |
| 8 | + = help: or consider changing `format!` to `format_args!` |
| 9 | + = note: `-D clippy::format-in-format-args` implied by `-D warnings` |
| 10 | + |
| 11 | +error: `format!` in `my_println2!` args |
| 12 | + --> $DIR/format_args_unfixable.rs:34:5 |
| 13 | + | |
| 14 | +LL | / my_println2!( |
| 15 | +LL | | true, |
| 16 | +LL | | "{}: {}", |
| 17 | +LL | | error, |
| 18 | +LL | | format!("something failed at {}", Location::caller()) |
| 19 | +LL | | ); |
| 20 | + | |_____^ |
| 21 | + | |
| 22 | + = help: combine the `format!(..)` arguments with the outer `my_println2!(..)` call |
| 23 | + = help: or consider changing `format!` to `format_args!` |
| 24 | + |
| 25 | +error: `format!` in `my_println2!` args |
| 26 | + --> $DIR/format_args_unfixable.rs:41:5 |
| 27 | + | |
| 28 | +LL | / my_println2!( |
| 29 | +LL | | true, |
| 30 | +LL | | "error: {}", |
| 31 | +LL | | format!("something failed at {}", Location::caller().to_string()) |
| 32 | +LL | | ); |
| 33 | + | |_____^ |
| 34 | + | |
| 35 | + = help: combine the `format!(..)` arguments with the outer `my_println2!(..)` call |
| 36 | + = help: or consider changing `format!` to `format_args!` |
| 37 | + |
| 38 | +error: `to_string` applied to a type that implements `Display` in `format!` args |
| 39 | + --> $DIR/format_args_unfixable.rs:44:61 |
| 40 | + | |
| 41 | +LL | format!("something failed at {}", Location::caller().to_string()) |
| 42 | + | ^^^^^^^^^^^^ help: remove this |
| 43 | + | |
| 44 | + = note: `-D clippy::to-string-in-format-args` implied by `-D warnings` |
| 45 | + |
| 46 | +error: `format!` in `my_println2!` args |
| 47 | + --> $DIR/format_args_unfixable.rs:46:5 |
| 48 | + | |
| 49 | +LL | / my_println2!( |
| 50 | +LL | | true, |
| 51 | +LL | | "{}: {}", |
| 52 | +LL | | error, |
| 53 | +LL | | format!("something failed at {}", Location::caller().to_string()) |
| 54 | +LL | | ); |
| 55 | + | |_____^ |
| 56 | + | |
| 57 | + = help: combine the `format!(..)` arguments with the outer `my_println2!(..)` call |
| 58 | + = help: or consider changing `format!` to `format_args!` |
| 59 | + |
| 60 | +error: `to_string` applied to a type that implements `Display` in `format!` args |
| 61 | + --> $DIR/format_args_unfixable.rs:50:61 |
| 62 | + | |
| 63 | +LL | format!("something failed at {}", Location::caller().to_string()) |
| 64 | + | ^^^^^^^^^^^^ help: remove this |
| 65 | + |
| 66 | +error: `to_string` applied to a type that implements `Display` in `my_println2!` args |
| 67 | + --> $DIR/format_args_unfixable.rs:53:55 |
| 68 | + | |
| 69 | +LL | my_println2!(true, "error: {}", Location::caller().to_string()); |
| 70 | + | ^^^^^^^^^^^^ help: remove this |
| 71 | + |
| 72 | +error: `to_string` applied to a type that implements `Display` in `my_println2!` args |
| 73 | + --> $DIR/format_args_unfixable.rs:54:59 |
| 74 | + | |
| 75 | +LL | my_println2!(true, "{}: {}", error, Location::caller().to_string()); |
| 76 | + | ^^^^^^^^^^^^ help: remove this |
| 77 | + |
| 78 | +error: `format!` in `my_println2_args!` args |
| 79 | + --> $DIR/format_args_unfixable.rs:56:5 |
| 80 | + | |
| 81 | +LL | my_println2_args!(true, "error: {}", format!("something failed at {}", Location::caller())); |
| 82 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 83 | + | |
| 84 | + = help: combine the `format!(..)` arguments with the outer `my_println2_args!(..)` call |
| 85 | + = help: or consider changing `format!` to `format_args!` |
| 86 | + |
| 87 | +error: `format!` in `my_println2_args!` args |
| 88 | + --> $DIR/format_args_unfixable.rs:57:5 |
| 89 | + | |
| 90 | +LL | / my_println2_args!( |
| 91 | +LL | | true, |
| 92 | +LL | | "{}: {}", |
| 93 | +LL | | error, |
| 94 | +LL | | format!("something failed at {}", Location::caller()) |
| 95 | +LL | | ); |
| 96 | + | |_____^ |
| 97 | + | |
| 98 | + = help: combine the `format!(..)` arguments with the outer `my_println2_args!(..)` call |
| 99 | + = help: or consider changing `format!` to `format_args!` |
| 100 | + |
| 101 | +error: aborting due to 10 previous errors |
| 102 | + |
0 commit comments