]> git.lizzy.rs Git - rust.git/blob - src/test/ui/non-fmt-panic.stderr
Auto merge of #94381 - Kobzol:llvm-bolt, r=Mark-Simulacrum
[rust.git] / src / test / ui / non-fmt-panic.stderr
1 warning: panic message contains a brace
2   --> $DIR/non-fmt-panic.rs:13:29
3    |
4 LL |     panic!("here's a brace: {");
5    |                             ^
6    |
7    = note: this message is not used as a format string, but will be in Rust 2021
8    = note: `#[warn(non_fmt_panics)]` on by default
9 help: add a "{}" format string to use the message literally
10    |
11 LL |     panic!("{}", "here's a brace: {");
12    |            +++++
13
14 warning: panic message contains a brace
15   --> $DIR/non-fmt-panic.rs:14:35
16    |
17 LL |     unreachable!("here's a brace: {");
18    |                                   ^
19    |
20    = note: this message is not used as a format string, but will be in Rust 2021
21 help: add a "{}" format string to use the message literally
22    |
23 LL |     unreachable!("{}", "here's a brace: {");
24    |                  +++++
25
26 warning: panic message contains a brace
27   --> $DIR/non-fmt-panic.rs:15:31
28    |
29 LL |     std::panic!("another one: }");
30    |                               ^
31    |
32    = note: this message is not used as a format string, but will be in Rust 2021
33 help: add a "{}" format string to use the message literally
34    |
35 LL |     std::panic!("{}", "another one: }");
36    |                 +++++
37
38 warning: panic message contains an unused formatting placeholder
39   --> $DIR/non-fmt-panic.rs:16:25
40    |
41 LL |     core::panic!("Hello {}");
42    |                         ^^
43    |
44    = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
45 help: add the missing argument
46    |
47 LL |     core::panic!("Hello {}", ...);
48    |                            +++++
49 help: or add a "{}" format string to use the message literally
50    |
51 LL |     core::panic!("{}", "Hello {}");
52    |                  +++++
53
54 warning: panic message contains unused formatting placeholders
55   --> $DIR/non-fmt-panic.rs:17:21
56    |
57 LL |     assert!(false, "{:03x} {test} bla");
58    |                     ^^^^^^ ^^^^^^
59    |
60    = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
61 help: add the missing arguments
62    |
63 LL |     assert!(false, "{:03x} {test} bla", ...);
64    |                                       +++++
65 help: or add a "{}" format string to use the message literally
66    |
67 LL |     assert!(false, "{}", "{:03x} {test} bla");
68    |                    +++++
69
70 warning: panic message is not a string literal
71   --> $DIR/non-fmt-panic.rs:19:20
72    |
73 LL |     assert!(false, S);
74    |                    ^
75    |
76    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
77    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
78 help: add a "{}" format string to `Display` the message
79    |
80 LL |     assert!(false, "{}", S);
81    |                    +++++
82
83 warning: panic message is not a string literal
84   --> $DIR/non-fmt-panic.rs:21:20
85    |
86 LL |     assert!(false, 123);
87    |                    ^^^
88    |
89    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
90    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
91 help: add a "{}" format string to `Display` the message
92    |
93 LL |     assert!(false, "{}", 123);
94    |                    +++++
95
96 warning: panic message is not a string literal
97   --> $DIR/non-fmt-panic.rs:23:20
98    |
99 LL |     assert!(false, Some(123));
100    |                    ^^^^^^^^^
101    |
102    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
103    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
104 help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>`
105    |
106 LL |     assert!(false, "{:?}", Some(123));
107    |                    +++++++
108
109 warning: panic message contains braces
110   --> $DIR/non-fmt-panic.rs:25:27
111    |
112 LL |     debug_assert!(false, "{{}} bla");
113    |                           ^^^^
114    |
115    = note: this message is not used as a format string, but will be in Rust 2021
116 help: add a "{}" format string to use the message literally
117    |
118 LL |     debug_assert!(false, "{}", "{{}} bla");
119    |                          +++++
120
121 warning: panic message is not a string literal
122   --> $DIR/non-fmt-panic.rs:26:12
123    |
124 LL |     panic!(C);
125    |            ^
126    |
127    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
128    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
129 help: add a "{}" format string to `Display` the message
130    |
131 LL |     panic!("{}", C);
132    |            +++++
133
134 warning: panic message is not a string literal
135   --> $DIR/non-fmt-panic.rs:27:12
136    |
137 LL |     panic!(S);
138    |            ^
139    |
140    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
141    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
142 help: add a "{}" format string to `Display` the message
143    |
144 LL |     panic!("{}", S);
145    |            +++++
146
147 warning: panic message is not a string literal
148   --> $DIR/non-fmt-panic.rs:28:18
149    |
150 LL |     unreachable!(S);
151    |                  ^
152    |
153    = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
154    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
155 help: add a "{}" format string to `Display` the message
156    |
157 LL |     unreachable!("{}", S);
158    |                  +++++
159
160 warning: panic message is not a string literal
161   --> $DIR/non-fmt-panic.rs:29:18
162    |
163 LL |     unreachable!(S);
164    |                  ^
165    |
166    = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
167    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
168 help: add a "{}" format string to `Display` the message
169    |
170 LL |     unreachable!("{}", S);
171    |                  +++++
172
173 warning: panic message is not a string literal
174   --> $DIR/non-fmt-panic.rs:30:17
175    |
176 LL |     std::panic!(123);
177    |                 ^^^
178    |
179    = note: this usage of `std::panic!()` is deprecated; it will be a hard error in Rust 2021
180    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
181 help: add a "{}" format string to `Display` the message
182    |
183 LL |     std::panic!("{}", 123);
184    |                 +++++
185 help: or use std::panic::panic_any instead
186    |
187 LL |     std::panic::panic_any(123);
188    |     ~~~~~~~~~~~~~~~~~~~~~
189
190 warning: panic message is not a string literal
191   --> $DIR/non-fmt-panic.rs:31:18
192    |
193 LL |     core::panic!(&*"abc");
194    |                  ^^^^^^^
195    |
196    = note: this usage of `core::panic!()` is deprecated; it will be a hard error in Rust 2021
197    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
198 help: add a "{}" format string to `Display` the message
199    |
200 LL |     core::panic!("{}", &*"abc");
201    |                  +++++
202
203 warning: panic message is not a string literal
204   --> $DIR/non-fmt-panic.rs:32:12
205    |
206 LL |     panic!(Some(123));
207    |            ^^^^^^^^^
208    |
209    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
210    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
211 help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>`
212    |
213 LL |     panic!("{:?}", Some(123));
214    |            +++++++
215 help: or use std::panic::panic_any instead
216    |
217 LL |     std::panic::panic_any(Some(123));
218    |     ~~~~~~~~~~~~~~~~~~~~~
219
220 warning: panic message contains an unused formatting placeholder
221   --> $DIR/non-fmt-panic.rs:33:12
222    |
223 LL |     panic!(concat!("{", "}"));
224    |            ^^^^^^^^^^^^^^^^^
225    |
226    = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
227 help: add the missing argument
228    |
229 LL |     panic!(concat!("{", "}"), ...);
230    |                             +++++
231 help: or add a "{}" format string to use the message literally
232    |
233 LL |     panic!("{}", concat!("{", "}"));
234    |            +++++
235
236 warning: panic message contains braces
237   --> $DIR/non-fmt-panic.rs:34:5
238    |
239 LL |     panic!(concat!("{", "{"));
240    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
241    |
242    = note: this message is not used as a format string, but will be in Rust 2021
243 help: add a "{}" format string to use the message literally
244    |
245 LL |     panic!("{}", concat!("{", "{"));
246    |            +++++
247
248 warning: panic message contains an unused formatting placeholder
249   --> $DIR/non-fmt-panic.rs:36:37
250    |
251 LL |     fancy_panic::fancy_panic!("test {} 123");
252    |                                     ^^
253    |
254    = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
255
256 warning: panic message is not a string literal
257   --> $DIR/non-fmt-panic.rs:46:12
258    |
259 LL |     panic!(a!());
260    |            ^^^^
261    |
262    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
263    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
264 help: add a "{}" format string to `Display` the message
265    |
266 LL |     panic!("{}", a!());
267    |            +++++
268 help: or use std::panic::panic_any instead
269    |
270 LL |     std::panic::panic_any(a!());
271    |     ~~~~~~~~~~~~~~~~~~~~~
272
273 warning: panic message is not a string literal
274   --> $DIR/non-fmt-panic.rs:47:18
275    |
276 LL |     unreachable!(a!());
277    |                  ^^^^
278    |
279    = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
280    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
281 help: add a "{}" format string to `Display` the message
282    |
283 LL |     unreachable!("{}", a!());
284    |                  +++++
285
286 warning: panic message is not a string literal
287   --> $DIR/non-fmt-panic.rs:49:12
288    |
289 LL |     panic!(format!("{}", 1));
290    |            ^^^^^^^^^^^^^^^^
291    |
292    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
293    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
294    = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here
295 help: remove the `format!(..)` macro call
296    |
297 LL -     panic!(format!("{}", 1));
298 LL +     panic!("{}", 1);
299    |
300
301 warning: panic message is not a string literal
302   --> $DIR/non-fmt-panic.rs:50:18
303    |
304 LL |     unreachable!(format!("{}", 1));
305    |                  ^^^^^^^^^^^^^^^^
306    |
307    = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
308    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
309    = note: the `unreachable!()` macro supports formatting, so there's no need for the `format!()` macro here
310 help: remove the `format!(..)` macro call
311    |
312 LL -     unreachable!(format!("{}", 1));
313 LL +     unreachable!("{}", 1);
314    |
315
316 warning: panic message is not a string literal
317   --> $DIR/non-fmt-panic.rs:51:20
318    |
319 LL |     assert!(false, format!("{}", 1));
320    |                    ^^^^^^^^^^^^^^^^
321    |
322    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
323    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
324    = note: the `assert!()` macro supports formatting, so there's no need for the `format!()` macro here
325 help: remove the `format!(..)` macro call
326    |
327 LL -     assert!(false, format!("{}", 1));
328 LL +     assert!(false, "{}", 1);
329    |
330
331 warning: panic message is not a string literal
332   --> $DIR/non-fmt-panic.rs:52:26
333    |
334 LL |     debug_assert!(false, format!("{}", 1));
335    |                          ^^^^^^^^^^^^^^^^
336    |
337    = note: this usage of `debug_assert!()` is deprecated; it will be a hard error in Rust 2021
338    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
339    = note: the `debug_assert!()` macro supports formatting, so there's no need for the `format!()` macro here
340 help: remove the `format!(..)` macro call
341    |
342 LL -     debug_assert!(false, format!("{}", 1));
343 LL +     debug_assert!(false, "{}", 1);
344    |
345
346 warning: panic message is not a string literal
347   --> $DIR/non-fmt-panic.rs:54:12
348    |
349 LL |     panic![123];
350    |            ^^^
351    |
352    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
353    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
354 help: add a "{}" format string to `Display` the message
355    |
356 LL |     panic!["{}", 123];
357    |            +++++
358 help: or use std::panic::panic_any instead
359    |
360 LL |     std::panic::panic_any(123);
361    |     ~~~~~~~~~~~~~~~~~~~~~~   ~
362
363 warning: panic message is not a string literal
364   --> $DIR/non-fmt-panic.rs:55:12
365    |
366 LL |     panic!{123};
367    |            ^^^
368    |
369    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
370    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
371 help: add a "{}" format string to `Display` the message
372    |
373 LL |     panic!{"{}", 123};
374    |            +++++
375 help: or use std::panic::panic_any instead
376    |
377 LL |     std::panic::panic_any(123);
378    |     ~~~~~~~~~~~~~~~~~~~~~~   ~
379
380 warning: panic message is not a string literal
381   --> $DIR/non-fmt-panic.rs:72:12
382    |
383 LL |     panic!(v);
384    |     ------ ^
385    |     |
386    |     help: use std::panic::panic_any instead: `std::panic::panic_any`
387    |
388    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
389    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
390
391 warning: panic message is not a string literal
392   --> $DIR/non-fmt-panic.rs:73:20
393    |
394 LL |     assert!(false, v);
395    |                    ^
396    |
397    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
398    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
399
400 warning: panic message is not a string literal
401   --> $DIR/non-fmt-panic.rs:77:12
402    |
403 LL |     panic!(v);
404    |            ^
405    |
406    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
407    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
408 help: add a "{:?}" format string to use the `Debug` implementation of `T`
409    |
410 LL |     panic!("{:?}", v);
411    |            +++++++
412 help: or use std::panic::panic_any instead
413    |
414 LL |     std::panic::panic_any(v);
415    |     ~~~~~~~~~~~~~~~~~~~~~
416
417 warning: panic message is not a string literal
418   --> $DIR/non-fmt-panic.rs:78:20
419    |
420 LL |     assert!(false, v);
421    |                    ^
422    |
423    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
424    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
425 help: add a "{:?}" format string to use the `Debug` implementation of `T`
426    |
427 LL |     assert!(false, "{:?}", v);
428    |                    +++++++
429
430 warning: panic message is not a string literal
431   --> $DIR/non-fmt-panic.rs:82:12
432    |
433 LL |     panic!(v);
434    |            ^
435    |
436    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
437    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
438 help: add a "{}" format string to `Display` the message
439    |
440 LL |     panic!("{}", v);
441    |            +++++
442 help: or use std::panic::panic_any instead
443    |
444 LL |     std::panic::panic_any(v);
445    |     ~~~~~~~~~~~~~~~~~~~~~
446
447 warning: panic message is not a string literal
448   --> $DIR/non-fmt-panic.rs:83:20
449    |
450 LL |     assert!(false, v);
451    |                    ^
452    |
453    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
454    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
455 help: add a "{}" format string to `Display` the message
456    |
457 LL |     assert!(false, "{}", v);
458    |                    +++++
459
460 warning: panic message is not a string literal
461   --> $DIR/non-fmt-panic.rs:87:12
462    |
463 LL |     panic!(v);
464    |            ^
465    |
466    = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
467    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
468 help: add a "{}" format string to `Display` the message
469    |
470 LL |     panic!("{}", v);
471    |            +++++
472 help: or use std::panic::panic_any instead
473    |
474 LL |     std::panic::panic_any(v);
475    |     ~~~~~~~~~~~~~~~~~~~~~
476
477 warning: panic message is not a string literal
478   --> $DIR/non-fmt-panic.rs:88:20
479    |
480 LL |     assert!(false, v);
481    |                    ^
482    |
483    = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
484    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
485 help: add a "{}" format string to `Display` the message
486    |
487 LL |     assert!(false, "{}", v);
488    |                    +++++
489
490 warning: 35 warnings emitted
491