]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/format_args_unfixable.stderr
Auto merge of #102536 - scottmcm:lookup_line-tweak, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / format_args_unfixable.stderr
1 error: `format!` in `println!` args
2   --> $DIR/format_args_unfixable.rs:25:5
3    |
4 LL |     println!("error: {}", format!("something failed at {}", Location::caller()));
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = help: combine the `format!(..)` arguments with the outer `println!(..)` 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 `println!` args
12   --> $DIR/format_args_unfixable.rs:26:5
13    |
14 LL |     println!("{}: {}", error, format!("something failed at {}", Location::caller()));
15    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16    |
17    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
18    = help: or consider changing `format!` to `format_args!`
19
20 error: `format!` in `println!` args
21   --> $DIR/format_args_unfixable.rs:27:5
22    |
23 LL |     println!("{:?}: {}", error, format!("something failed at {}", Location::caller()));
24    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25    |
26    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
27    = help: or consider changing `format!` to `format_args!`
28
29 error: `format!` in `println!` args
30   --> $DIR/format_args_unfixable.rs:28:5
31    |
32 LL |     println!("{{}}: {}", format!("something failed at {}", Location::caller()));
33    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34    |
35    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
36    = help: or consider changing `format!` to `format_args!`
37
38 error: `format!` in `println!` args
39   --> $DIR/format_args_unfixable.rs:29:5
40    |
41 LL |     println!(r#"error: "{}""#, format!("something failed at {}", Location::caller()));
42    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43    |
44    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
45    = help: or consider changing `format!` to `format_args!`
46
47 error: `format!` in `println!` args
48   --> $DIR/format_args_unfixable.rs:30:5
49    |
50 LL |     println!("error: {}", format!(r#"something failed at "{}""#, Location::caller()));
51    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52    |
53    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
54    = help: or consider changing `format!` to `format_args!`
55
56 error: `format!` in `println!` args
57   --> $DIR/format_args_unfixable.rs:31:5
58    |
59 LL |     println!("error: {}", format!("something failed at {} {0}", Location::caller()));
60    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61    |
62    = help: combine the `format!(..)` arguments with the outer `println!(..)` call
63    = help: or consider changing `format!` to `format_args!`
64
65 error: `format!` in `format!` args
66   --> $DIR/format_args_unfixable.rs:32:13
67    |
68 LL |     let _ = format!("error: {}", format!("something failed at {}", Location::caller()));
69    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70    |
71    = help: combine the `format!(..)` arguments with the outer `format!(..)` call
72    = help: or consider changing `format!` to `format_args!`
73
74 error: `format!` in `write!` args
75   --> $DIR/format_args_unfixable.rs:33:13
76    |
77 LL |       let _ = write!(
78    |  _____________^
79 LL | |         stdout(),
80 LL | |         "error: {}",
81 LL | |         format!("something failed at {}", Location::caller())
82 LL | |     );
83    | |_____^
84    |
85    = help: combine the `format!(..)` arguments with the outer `write!(..)` call
86    = help: or consider changing `format!` to `format_args!`
87
88 error: `format!` in `writeln!` args
89   --> $DIR/format_args_unfixable.rs:38:13
90    |
91 LL |       let _ = writeln!(
92    |  _____________^
93 LL | |         stdout(),
94 LL | |         "error: {}",
95 LL | |         format!("something failed at {}", Location::caller())
96 LL | |     );
97    | |_____^
98    |
99    = help: combine the `format!(..)` arguments with the outer `writeln!(..)` call
100    = help: or consider changing `format!` to `format_args!`
101
102 error: `format!` in `print!` args
103   --> $DIR/format_args_unfixable.rs:43:5
104    |
105 LL |     print!("error: {}", format!("something failed at {}", Location::caller()));
106    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107    |
108    = help: combine the `format!(..)` arguments with the outer `print!(..)` call
109    = help: or consider changing `format!` to `format_args!`
110
111 error: `format!` in `eprint!` args
112   --> $DIR/format_args_unfixable.rs:44:5
113    |
114 LL |     eprint!("error: {}", format!("something failed at {}", Location::caller()));
115    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116    |
117    = help: combine the `format!(..)` arguments with the outer `eprint!(..)` call
118    = help: or consider changing `format!` to `format_args!`
119
120 error: `format!` in `eprintln!` args
121   --> $DIR/format_args_unfixable.rs:45:5
122    |
123 LL |     eprintln!("error: {}", format!("something failed at {}", Location::caller()));
124    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125    |
126    = help: combine the `format!(..)` arguments with the outer `eprintln!(..)` call
127    = help: or consider changing `format!` to `format_args!`
128
129 error: `format!` in `format_args!` args
130   --> $DIR/format_args_unfixable.rs:46:13
131    |
132 LL |     let _ = format_args!("error: {}", format!("something failed at {}", Location::caller()));
133    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134    |
135    = help: combine the `format!(..)` arguments with the outer `format_args!(..)` call
136    = help: or consider changing `format!` to `format_args!`
137
138 error: `format!` in `assert!` args
139   --> $DIR/format_args_unfixable.rs:47:5
140    |
141 LL |     assert!(true, "error: {}", format!("something failed at {}", Location::caller()));
142    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143    |
144    = help: combine the `format!(..)` arguments with the outer `assert!(..)` call
145    = help: or consider changing `format!` to `format_args!`
146
147 error: `format!` in `assert_eq!` args
148   --> $DIR/format_args_unfixable.rs:48:5
149    |
150 LL |     assert_eq!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
151    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152    |
153    = help: combine the `format!(..)` arguments with the outer `assert_eq!(..)` call
154    = help: or consider changing `format!` to `format_args!`
155
156 error: `format!` in `assert_ne!` args
157   --> $DIR/format_args_unfixable.rs:49:5
158    |
159 LL |     assert_ne!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
160    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161    |
162    = help: combine the `format!(..)` arguments with the outer `assert_ne!(..)` call
163    = help: or consider changing `format!` to `format_args!`
164
165 error: `format!` in `panic!` args
166   --> $DIR/format_args_unfixable.rs:50:5
167    |
168 LL |     panic!("error: {}", format!("something failed at {}", Location::caller()));
169    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170    |
171    = help: combine the `format!(..)` arguments with the outer `panic!(..)` call
172    = help: or consider changing `format!` to `format_args!`
173
174 error: aborting due to 18 previous errors
175