rust/src/test/ui/panic-brace.stderr

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-10-18 15:52:36 -05:00
warning: Panic message contains a brace
--> $DIR/panic-brace.rs:5:5
|
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 version
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:6:5
|
LL | std::panic!("another one: }");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: This message is not used as a format string, but will be in a future Rust version
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:7:18
2020-10-18 15:52:36 -05:00
|
LL | core::panic!("Hello {}");
| ^^^^^^^^^^
2020-10-18 15:52:36 -05:00
|
= note: This message is not used as a format string when given without arguments, but will be in a future Rust version
help: add the missing argument(s)
|
LL | core::panic!("Hello {}", argument);
| ^^^^^^^^^^
help: or add a "{}" format string to use the message literally
2020-10-18 15:52:36 -05:00
|
LL | core::panic!("{}", "Hello {}");
2020-10-18 15:52:36 -05:00
| ^^^^^
warning: Panic message contains an unused formatting placeholder
--> $DIR/panic-brace.rs:8:20
2020-10-18 15:52:36 -05:00
|
LL | assert!(false, "{:03x} bla");
| ^^^^^^^^^^^^
2020-10-18 15:52:36 -05:00
|
= note: This message is not used as a format string when given without arguments, but will be in a future Rust version
help: add the missing argument(s)
|
LL | assert!(false, "{:03x} bla", argument);
| ^^^^^^^^^^
help: or add a "{}" format string to use the message literally
2020-10-18 15:52:36 -05:00
|
LL | assert!(false, "{}", "{:03x} bla");
2020-10-18 15:52:36 -05:00
| ^^^^^
warning: 4 warnings emitted