1 warning: panic message contains a brace
2 --> $DIR/non-fmt-panic.rs:11: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:12: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:13: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:14: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:16:20
61 LL | assert!(false, S);
64 = note: this usage of panic!() 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 contains braces
72 --> $DIR/non-fmt-panic.rs:18:27
74 LL | debug_assert!(false, "{{}} bla");
77 = note: this message is not used as a format string, but will be in Rust 2021
78 help: add a "{}" format string to use the message literally
80 LL | debug_assert!(false, "{}", "{{}} bla");
83 warning: panic message is not a string literal
84 --> $DIR/non-fmt-panic.rs:19:12
89 = note: this usage of panic!() 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
95 help: or use std::panic::panic_any instead
97 LL | std::panic::panic_any(C);
98 | ^^^^^^^^^^^^^^^^^^^^^
100 warning: panic message is not a string literal
101 --> $DIR/non-fmt-panic.rs:20:12
106 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
107 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
108 help: add a "{}" format string to Display the message
110 LL | panic!("{}", S);
112 help: or use std::panic::panic_any instead
114 LL | std::panic::panic_any(S);
115 | ^^^^^^^^^^^^^^^^^^^^^
117 warning: panic message is not a string literal
118 --> $DIR/non-fmt-panic.rs:21:17
120 LL | std::panic!(123);
123 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
124 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
125 help: add a "{}" format string to Display the message
127 LL | std::panic!("{}", 123);
129 help: or use std::panic::panic_any instead
131 LL | std::panic::panic_any(123);
132 | ^^^^^^^^^^^^^^^^^^^^^
134 warning: panic message is not a string literal
135 --> $DIR/non-fmt-panic.rs:22:18
137 LL | core::panic!(&*"abc");
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
144 LL | core::panic!("{}", &*"abc");
147 warning: panic message contains an unused formatting placeholder
148 --> $DIR/non-fmt-panic.rs:23:12
150 LL | panic!(concat!("{", "}"));
153 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
154 help: add the missing argument
156 LL | panic!(concat!("{", "}"), ...);
158 help: or add a "{}" format string to use the message literally
160 LL | panic!("{}", concat!("{", "}"));
163 warning: panic message contains braces
164 --> $DIR/non-fmt-panic.rs:24:5
166 LL | panic!(concat!("{", "{"));
167 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
169 = note: this message is not used as a format string, but will be in Rust 2021
170 help: add a "{}" format string to use the message literally
172 LL | panic!("{}", concat!("{", "{"));
175 warning: panic message contains an unused formatting placeholder
176 --> $DIR/non-fmt-panic.rs:26:37
178 LL | fancy_panic::fancy_panic!("test {} 123");
181 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
183 warning: panic message is not a string literal
184 --> $DIR/non-fmt-panic.rs:29:31
186 LL | fancy_panic::fancy_panic!(S);
189 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
190 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
192 warning: panic message is not a string literal
193 --> $DIR/non-fmt-panic.rs:36:12
198 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
199 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
200 help: add a "{}" format string to Display the message
202 LL | panic!("{}", a!());
204 help: or use std::panic::panic_any instead
206 LL | std::panic::panic_any(a!());
207 | ^^^^^^^^^^^^^^^^^^^^^
209 warning: panic message is not a string literal
210 --> $DIR/non-fmt-panic.rs:38:12
212 LL | panic!(format!("{}", 1));
215 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
216 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
217 = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
218 help: remove the `format!(..)` macro call
220 LL | panic!("{}", 1);
223 warning: panic message is not a string literal
224 --> $DIR/non-fmt-panic.rs:39:20
226 LL | assert!(false, format!("{}", 1));
229 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
230 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
231 = note: the assert!() macro supports formatting, so there's no need for the format!() macro here
232 help: remove the `format!(..)` macro call
234 LL | assert!(false, "{}", 1);
237 warning: panic message is not a string literal
238 --> $DIR/non-fmt-panic.rs:40:26
240 LL | debug_assert!(false, format!("{}", 1));
243 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
244 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
245 = note: the debug_assert!() macro supports formatting, so there's no need for the format!() macro here
246 help: remove the `format!(..)` macro call
248 LL | debug_assert!(false, "{}", 1);
251 warning: panic message is not a string literal
252 --> $DIR/non-fmt-panic.rs:42:12
257 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
258 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
259 help: add a "{}" format string to Display the message
261 LL | panic!["{}", 123];
263 help: or use std::panic::panic_any instead
265 LL | std::panic::panic_any(123);
266 | ^^^^^^^^^^^^^^^^^^^^^^ ^
268 warning: panic message is not a string literal
269 --> $DIR/non-fmt-panic.rs:43:12
274 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
275 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
276 help: add a "{}" format string to Display the message
278 LL | panic!{"{}", 123};
280 help: or use std::panic::panic_any instead
282 LL | std::panic::panic_any(123);
283 | ^^^^^^^^^^^^^^^^^^^^^^ ^
285 warning: 20 warnings emitted