mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
108 lines
3.6 KiB
Plaintext
108 lines
3.6 KiB
Plaintext
warning: panic message contains a brace
|
|
--> $DIR/panic-brace.rs:11:29
|
|
|
|
|
LL | panic!("here's a brace: {");
|
|
| ^
|
|
|
|
|
= note: `#[warn(panic_fmt)]` on by default
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
LL | panic!("{}", "here's a brace: {");
|
|
| ^^^^^
|
|
|
|
warning: panic message contains a brace
|
|
--> $DIR/panic-brace.rs:12:31
|
|
|
|
|
LL | std::panic!("another one: }");
|
|
| ^
|
|
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
LL | std::panic!("{}", "another one: }");
|
|
| ^^^^^
|
|
|
|
warning: panic message contains an unused formatting placeholder
|
|
--> $DIR/panic-brace.rs:13:25
|
|
|
|
|
LL | core::panic!("Hello {}");
|
|
| ^^
|
|
|
|
|
= 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
|
|
|
|
|
LL | core::panic!("Hello {}", ...);
|
|
| ^^^^^
|
|
help: or add a "{}" format string to use the message literally
|
|
|
|
|
LL | core::panic!("{}", "Hello {}");
|
|
| ^^^^^
|
|
|
|
warning: panic message contains unused formatting placeholders
|
|
--> $DIR/panic-brace.rs:14:21
|
|
|
|
|
LL | assert!(false, "{:03x} {test} bla");
|
|
| ^^^^^^ ^^^^^^
|
|
|
|
|
= 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
|
|
|
|
|
LL | assert!(false, "{:03x} {test} bla", ...);
|
|
| ^^^^^
|
|
help: or add a "{}" format string to use the message literally
|
|
|
|
|
LL | assert!(false, "{}", "{:03x} {test} bla");
|
|
| ^^^^^
|
|
|
|
warning: panic message contains braces
|
|
--> $DIR/panic-brace.rs:16:27
|
|
|
|
|
LL | debug_assert!(false, "{{}} bla");
|
|
| ^^^^
|
|
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
LL | debug_assert!(false, "{}", "{{}} bla");
|
|
| ^^^^^
|
|
|
|
warning: panic message contains an unused formatting placeholder
|
|
--> $DIR/panic-brace.rs:19:12
|
|
|
|
|
LL | panic!(concat!("{", "}"));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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
|
|
|
|
|
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:20:5
|
|
|
|
|
LL | panic!(concat!("{", "{"));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this message is not used as a format string, but will be in a future Rust edition
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
LL | panic!("{}", concat!("{", "{"));
|
|
| ^^^^^
|
|
|
|
warning: panic message contains an unused formatting placeholder
|
|
--> $DIR/panic-brace.rs:22:37
|
|
|
|
|
LL | fancy_panic::fancy_panic!("test {} 123");
|
|
| ^^
|
|
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
|
|
|
|
warning: 8 warnings emitted
|
|
|