1 error: `format!` in `println!` args
2 --> $DIR/format_args_unfixable.rs:27:5
4 LL | println!("error: {}", format!("something failed at {}", Location::caller()));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::format-in-format-args` implied by `-D warnings`
8 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
9 = help: or consider changing `format!` to `format_args!`
11 error: `format!` in `println!` args
12 --> $DIR/format_args_unfixable.rs:28:5
14 LL | println!("{}: {}", error, format!("something failed at {}", Location::caller()));
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
18 = help: or consider changing `format!` to `format_args!`
20 error: `format!` in `println!` args
21 --> $DIR/format_args_unfixable.rs:29:5
23 LL | println!("{:?}: {}", error, format!("something failed at {}", Location::caller()));
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
27 = help: or consider changing `format!` to `format_args!`
29 error: `format!` in `println!` args
30 --> $DIR/format_args_unfixable.rs:30:5
32 LL | println!("{{}}: {}", format!("something failed at {}", Location::caller()));
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
36 = help: or consider changing `format!` to `format_args!`
38 error: `format!` in `println!` args
39 --> $DIR/format_args_unfixable.rs:31:5
41 LL | println!(r#"error: "{}""#, format!("something failed at {}", Location::caller()));
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
45 = help: or consider changing `format!` to `format_args!`
47 error: `format!` in `println!` args
48 --> $DIR/format_args_unfixable.rs:32:5
50 LL | println!("error: {}", format!(r#"something failed at "{}""#, Location::caller()));
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
54 = help: or consider changing `format!` to `format_args!`
56 error: `format!` in `println!` args
57 --> $DIR/format_args_unfixable.rs:33:5
59 LL | println!("error: {}", format!("something failed at {} {0}", Location::caller()));
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 = help: combine the `format!(..)` arguments with the outer `println!(..)` call
63 = help: or consider changing `format!` to `format_args!`
65 error: `format!` in `format!` args
66 --> $DIR/format_args_unfixable.rs:34:13
68 LL | let _ = format!("error: {}", format!("something failed at {}", Location::caller()));
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71 = help: combine the `format!(..)` arguments with the outer `format!(..)` call
72 = help: or consider changing `format!` to `format_args!`
74 error: `format!` in `write!` args
75 --> $DIR/format_args_unfixable.rs:35:13
81 LL | | format!("something failed at {}", Location::caller())
85 = help: combine the `format!(..)` arguments with the outer `write!(..)` call
86 = help: or consider changing `format!` to `format_args!`
88 error: `format!` in `writeln!` args
89 --> $DIR/format_args_unfixable.rs:40:13
91 LL | let _ = writeln!(
95 LL | | format!("something failed at {}", Location::caller())
99 = help: combine the `format!(..)` arguments with the outer `writeln!(..)` call
100 = help: or consider changing `format!` to `format_args!`
102 error: `format!` in `print!` args
103 --> $DIR/format_args_unfixable.rs:45:5
105 LL | print!("error: {}", format!("something failed at {}", Location::caller()));
106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108 = help: combine the `format!(..)` arguments with the outer `print!(..)` call
109 = help: or consider changing `format!` to `format_args!`
111 error: `format!` in `eprint!` args
112 --> $DIR/format_args_unfixable.rs:46:5
114 LL | eprint!("error: {}", format!("something failed at {}", Location::caller()));
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117 = help: combine the `format!(..)` arguments with the outer `eprint!(..)` call
118 = help: or consider changing `format!` to `format_args!`
120 error: `format!` in `eprintln!` args
121 --> $DIR/format_args_unfixable.rs:47:5
123 LL | eprintln!("error: {}", format!("something failed at {}", Location::caller()));
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126 = help: combine the `format!(..)` arguments with the outer `eprintln!(..)` call
127 = help: or consider changing `format!` to `format_args!`
129 error: `format!` in `format_args!` args
130 --> $DIR/format_args_unfixable.rs:48:13
132 LL | let _ = format_args!("error: {}", format!("something failed at {}", Location::caller()));
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 = help: combine the `format!(..)` arguments with the outer `format_args!(..)` call
136 = help: or consider changing `format!` to `format_args!`
138 error: `format!` in `assert!` args
139 --> $DIR/format_args_unfixable.rs:49:5
141 LL | assert!(true, "error: {}", format!("something failed at {}", Location::caller()));
142 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144 = help: combine the `format!(..)` arguments with the outer `assert!(..)` call
145 = help: or consider changing `format!` to `format_args!`
147 error: `format!` in `assert_eq!` args
148 --> $DIR/format_args_unfixable.rs:50:5
150 LL | assert_eq!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153 = help: combine the `format!(..)` arguments with the outer `assert_eq!(..)` call
154 = help: or consider changing `format!` to `format_args!`
156 error: `format!` in `assert_ne!` args
157 --> $DIR/format_args_unfixable.rs:51:5
159 LL | assert_ne!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
160 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162 = help: combine the `format!(..)` arguments with the outer `assert_ne!(..)` call
163 = help: or consider changing `format!` to `format_args!`
165 error: `format!` in `panic!` args
166 --> $DIR/format_args_unfixable.rs:52:5
168 LL | panic!("error: {}", format!("something failed at {}", Location::caller()));
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171 = help: combine the `format!(..)` arguments with the outer `panic!(..)` call
172 = help: or consider changing `format!` to `format_args!`
174 error: aborting due to 18 previous errors