1 warning: panic message contains a brace
2 --> $DIR/non-fmt-panic.rs:13:29
4 LL | panic!("here's a brace: {");
7 = note: `#[warn(non_fmt_panics)]` on by default
8 = note: this message is not used as a format string, but will be in Rust 2021
9 help: add a "{}" format string to use the message literally
11 LL | panic!("{}", "here's a brace: {");
14 warning: panic message contains a brace
15 --> $DIR/non-fmt-panic.rs:14:31
17 LL | std::panic!("another one: }");
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
23 LL | std::panic!("{}", "another one: }");
26 warning: panic message contains an unused formatting placeholder
27 --> $DIR/non-fmt-panic.rs:15:25
29 LL | core::panic!("Hello {}");
32 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
33 help: add the missing argument
35 LL | core::panic!("Hello {}", ...);
37 help: or add a "{}" format string to use the message literally
39 LL | core::panic!("{}", "Hello {}");
42 warning: panic message contains unused formatting placeholders
43 --> $DIR/non-fmt-panic.rs:16:21
45 LL | assert!(false, "{:03x} {test} bla");
48 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
49 help: add the missing arguments
51 LL | assert!(false, "{:03x} {test} bla", ...);
53 help: or add a "{}" format string to use the message literally
55 LL | assert!(false, "{}", "{:03x} {test} bla");
58 warning: panic message is not a string literal
59 --> $DIR/non-fmt-panic.rs:18:20
61 LL | assert!(false, S);
64 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
65 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
66 help: add a "{}" format string to Display the message
68 LL | assert!(false, "{}", S);
71 warning: panic message is not a string literal
72 --> $DIR/non-fmt-panic.rs:20:20
74 LL | assert!(false, 123);
77 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
78 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
79 help: add a "{}" format string to Display the message
81 LL | assert!(false, "{}", 123);
84 warning: panic message is not a string literal
85 --> $DIR/non-fmt-panic.rs:22:20
87 LL | assert!(false, Some(123));
90 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
91 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
92 help: add a "{:?}" format string to use the Debug implementation of `Option<i32>`
94 LL | assert!(false, "{:?}", Some(123));
97 warning: panic message contains braces
98 --> $DIR/non-fmt-panic.rs:24:27
100 LL | debug_assert!(false, "{{}} bla");
103 = note: this message is not used as a format string, but will be in Rust 2021
104 help: add a "{}" format string to use the message literally
106 LL | debug_assert!(false, "{}", "{{}} bla");
109 warning: panic message is not a string literal
110 --> $DIR/non-fmt-panic.rs:25:12
115 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
116 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
117 help: add a "{}" format string to Display the message
119 LL | panic!("{}", C);
122 warning: panic message is not a string literal
123 --> $DIR/non-fmt-panic.rs:26:12
128 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
129 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
130 help: add a "{}" format string to Display the message
132 LL | panic!("{}", S);
135 warning: panic message is not a string literal
136 --> $DIR/non-fmt-panic.rs:27:17
138 LL | std::panic!(123);
141 = note: this usage of std::panic!() is deprecated; it will be a hard error in Rust 2021
142 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
143 help: add a "{}" format string to Display the message
145 LL | std::panic!("{}", 123);
147 help: or use std::panic::panic_any instead
149 LL | std::panic::panic_any(123);
150 | ~~~~~~~~~~~~~~~~~~~~~
152 warning: panic message is not a string literal
153 --> $DIR/non-fmt-panic.rs:28:18
155 LL | core::panic!(&*"abc");
158 = note: this usage of core::panic!() is deprecated; it will be a hard error in Rust 2021
159 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
160 help: add a "{}" format string to Display the message
162 LL | core::panic!("{}", &*"abc");
165 warning: panic message is not a string literal
166 --> $DIR/non-fmt-panic.rs:29:12
168 LL | panic!(Some(123));
171 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
172 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
173 help: add a "{:?}" format string to use the Debug implementation of `Option<i32>`
175 LL | panic!("{:?}", Some(123));
177 help: or use std::panic::panic_any instead
179 LL | std::panic::panic_any(Some(123));
180 | ~~~~~~~~~~~~~~~~~~~~~
182 warning: panic message contains an unused formatting placeholder
183 --> $DIR/non-fmt-panic.rs:30:12
185 LL | panic!(concat!("{", "}"));
188 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
189 help: add the missing argument
191 LL | panic!(concat!("{", "}"), ...);
193 help: or add a "{}" format string to use the message literally
195 LL | panic!("{}", concat!("{", "}"));
198 warning: panic message contains braces
199 --> $DIR/non-fmt-panic.rs:31:5
201 LL | panic!(concat!("{", "{"));
202 | ^^^^^^^^^^^^^^^^^^^^^^^^^
204 = note: this message is not used as a format string, but will be in Rust 2021
205 help: add a "{}" format string to use the message literally
207 LL | panic!("{}", concat!("{", "{"));
210 warning: panic message contains an unused formatting placeholder
211 --> $DIR/non-fmt-panic.rs:33:37
213 LL | fancy_panic::fancy_panic!("test {} 123");
216 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
218 warning: panic message is not a string literal
219 --> $DIR/non-fmt-panic.rs:43:12
224 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
225 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
226 help: add a "{}" format string to Display the message
228 LL | panic!("{}", a!());
230 help: or use std::panic::panic_any instead
232 LL | std::panic::panic_any(a!());
233 | ~~~~~~~~~~~~~~~~~~~~~
235 warning: panic message is not a string literal
236 --> $DIR/non-fmt-panic.rs:45:12
238 LL | panic!(format!("{}", 1));
241 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
242 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
243 = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
244 help: remove the `format!(..)` macro call
246 LL - panic!(format!("{}", 1));
247 LL + panic!("{}", 1);
250 warning: panic message is not a string literal
251 --> $DIR/non-fmt-panic.rs:46:20
253 LL | assert!(false, format!("{}", 1));
256 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
257 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
258 = note: the assert!() macro supports formatting, so there's no need for the format!() macro here
259 help: remove the `format!(..)` macro call
261 LL - assert!(false, format!("{}", 1));
262 LL + assert!(false, "{}", 1);
265 warning: panic message is not a string literal
266 --> $DIR/non-fmt-panic.rs:47:26
268 LL | debug_assert!(false, format!("{}", 1));
271 = note: this usage of debug_assert!() is deprecated; it will be a hard error in Rust 2021
272 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
273 = note: the debug_assert!() macro supports formatting, so there's no need for the format!() macro here
274 help: remove the `format!(..)` macro call
276 LL - debug_assert!(false, format!("{}", 1));
277 LL + debug_assert!(false, "{}", 1);
280 warning: panic message is not a string literal
281 --> $DIR/non-fmt-panic.rs:49:12
286 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
287 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
288 help: add a "{}" format string to Display the message
290 LL | panic!["{}", 123];
292 help: or use std::panic::panic_any instead
294 LL | std::panic::panic_any(123);
295 | ~~~~~~~~~~~~~~~~~~~~~~ ~
297 warning: panic message is not a string literal
298 --> $DIR/non-fmt-panic.rs:50:12
303 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
304 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
305 help: add a "{}" format string to Display the message
307 LL | panic!{"{}", 123};
309 help: or use std::panic::panic_any instead
311 LL | std::panic::panic_any(123);
312 | ~~~~~~~~~~~~~~~~~~~~~~ ~
314 warning: panic message is not a string literal
315 --> $DIR/non-fmt-panic.rs:67:12
320 | help: use std::panic::panic_any instead: `std::panic::panic_any`
322 = note: this usage of panic!() 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>
325 warning: panic message is not a string literal
326 --> $DIR/non-fmt-panic.rs:68:20
328 LL | assert!(false, v);
331 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
332 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
334 warning: panic message is not a string literal
335 --> $DIR/non-fmt-panic.rs:72:12
340 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
341 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
342 help: add a "{:?}" format string to use the Debug implementation of `T`
344 LL | panic!("{:?}", v);
346 help: or use std::panic::panic_any instead
348 LL | std::panic::panic_any(v);
349 | ~~~~~~~~~~~~~~~~~~~~~
351 warning: panic message is not a string literal
352 --> $DIR/non-fmt-panic.rs:73:20
354 LL | assert!(false, v);
357 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
358 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
359 help: add a "{:?}" format string to use the Debug implementation of `T`
361 LL | assert!(false, "{:?}", v);
364 warning: panic message is not a string literal
365 --> $DIR/non-fmt-panic.rs:77:12
370 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
371 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
372 help: add a "{}" format string to Display the message
374 LL | panic!("{}", v);
376 help: or use std::panic::panic_any instead
378 LL | std::panic::panic_any(v);
379 | ~~~~~~~~~~~~~~~~~~~~~
381 warning: panic message is not a string literal
382 --> $DIR/non-fmt-panic.rs:78:20
384 LL | assert!(false, v);
387 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
388 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
389 help: add a "{}" format string to Display the message
391 LL | assert!(false, "{}", v);
394 warning: panic message is not a string literal
395 --> $DIR/non-fmt-panic.rs:82:12
400 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
401 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
402 help: add a "{}" format string to Display the message
404 LL | panic!("{}", v);
406 help: or use std::panic::panic_any instead
408 LL | std::panic::panic_any(v);
409 | ~~~~~~~~~~~~~~~~~~~~~
411 warning: panic message is not a string literal
412 --> $DIR/non-fmt-panic.rs:83:20
414 LL | assert!(false, v);
417 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
418 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
419 help: add a "{}" format string to Display the message
421 LL | assert!(false, "{}", v);
424 warning: 30 warnings emitted