2020-10-19 21:14:05 +02:00
|
|
|
warning: panic message contains a brace
|
2020-10-20 22:59:53 +02:00
|
|
|
--> $DIR/panic-brace.rs:8:29
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
|
|
|
LL | panic!("here's a brace: {");
|
2020-10-20 22:59:53 +02:00
|
|
|
| ^
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
|
|
|
= note: `#[warn(panic_fmt)]` on by default
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
2020-10-18 22:52:36 +02:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", "here's a brace: {");
|
|
|
|
| ^^^^^
|
|
|
|
|
2020-10-19 21:14:05 +02:00
|
|
|
warning: panic message contains a brace
|
2020-10-20 22:59:53 +02:00
|
|
|
--> $DIR/panic-brace.rs:9:31
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
|
|
|
LL | std::panic!("another one: }");
|
2020-10-20 22:59:53 +02:00
|
|
|
| ^
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
2020-10-18 22:52:36 +02:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | std::panic!("{}", "another one: }");
|
|
|
|
| ^^^^^
|
|
|
|
|
2020-10-19 21:14:05 +02:00
|
|
|
warning: panic message contains an unused formatting placeholder
|
2020-10-20 22:59:53 +02:00
|
|
|
--> $DIR/panic-brace.rs:10:25
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-18 23:36:00 +02:00
|
|
|
LL | core::panic!("Hello {}");
|
2020-10-20 22:25:42 +02:00
|
|
|
| ^^
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
|
|
|
|
help: add the missing argument
|
2020-10-18 23:36:00 +02:00
|
|
|
|
|
2020-10-20 22:25:42 +02:00
|
|
|
LL | core::panic!("Hello {}", ...);
|
|
|
|
| ^^^^^
|
2020-10-18 23:36:00 +02:00
|
|
|
help: or add a "{}" format string to use the message literally
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-18 23:36:00 +02:00
|
|
|
LL | core::panic!("{}", "Hello {}");
|
2020-10-18 22:52:36 +02:00
|
|
|
| ^^^^^
|
|
|
|
|
2020-10-20 22:25:42 +02:00
|
|
|
warning: panic message contains unused formatting placeholders
|
2020-10-20 22:59:53 +02:00
|
|
|
--> $DIR/panic-brace.rs:11:21
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-20 22:25:42 +02:00
|
|
|
LL | assert!(false, "{:03x} {test} bla");
|
|
|
|
| ^^^^^^ ^^^^^^
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
|
|
|
|
help: add the missing arguments
|
2020-10-18 23:36:00 +02:00
|
|
|
|
|
2020-10-20 22:25:42 +02:00
|
|
|
LL | assert!(false, "{:03x} {test} bla", ...);
|
|
|
|
| ^^^^^
|
2020-10-18 23:36:00 +02:00
|
|
|
help: or add a "{}" format string to use the message literally
|
2020-10-18 22:52:36 +02:00
|
|
|
|
|
2020-10-20 22:25:42 +02:00
|
|
|
LL | assert!(false, "{}", "{:03x} {test} bla");
|
2020-10-18 22:52:36 +02:00
|
|
|
| ^^^^^
|
|
|
|
|
2020-10-20 22:59:53 +02:00
|
|
|
warning: panic message contains braces
|
|
|
|
--> $DIR/panic-brace.rs:13:27
|
2020-10-19 00:45:07 +02:00
|
|
|
|
|
|
|
|
LL | debug_assert!(false, "{{}} bla");
|
2020-10-20 22:59:53 +02:00
|
|
|
| ^^^^
|
2020-10-19 00:45:07 +02:00
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
2020-10-19 00:45:07 +02:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | debug_assert!(false, "{}", "{{}} bla");
|
|
|
|
| ^^^^^
|
|
|
|
|
2020-10-20 22:59:53 +02:00
|
|
|
warning: panic message contains an unused formatting placeholder
|
|
|
|
--> $DIR/panic-brace.rs:16:12
|
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "}"));
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
|
|
|
|
help: add the missing argument
|
2020-10-20 22:59:53 +02:00
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "}"), ...);
|
|
|
|
| ^^^^^
|
|
|
|
help: or add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", concat!("{", "}"));
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
warning: panic message contains braces
|
|
|
|
--> $DIR/panic-brace.rs:17:5
|
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "{"));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-10-29 19:44:06 +01:00
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
2020-10-20 22:59:53 +02:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", concat!("{", "{"));
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
warning: 7 warnings emitted
|
2020-10-18 22:52:36 +02:00
|
|
|
|