2020-10-19 14:14:05 -05:00
|
|
|
warning: panic message contains a brace
|
2021-08-12 12:15:47 -05:00
|
|
|
--> $DIR/non-fmt-panic.rs:13:29
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
|
|
|
LL | panic!("here's a brace: {");
|
2020-10-20 15:59:53 -05:00
|
|
|
| ^
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string, but will be in Rust 2021
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(non_fmt_panics)]` on by default
|
2020-10-18 15:52:36 -05:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", "here's a brace: {");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 15:52:36 -05:00
|
|
|
|
2020-10-19 14:14:05 -05:00
|
|
|
warning: panic message contains a brace
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:14:35
|
|
|
|
|
|
|
|
|
LL | unreachable!("here's a brace: {");
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= note: this message is not used as a format string, but will be in Rust 2021
|
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | unreachable!("{}", "here's a brace: {");
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message contains a brace
|
|
|
|
--> $DIR/non-fmt-panic.rs:15:31
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
|
|
|
LL | std::panic!("another one: }");
|
2020-10-20 15:59:53 -05:00
|
|
|
| ^
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string, but will be in Rust 2021
|
2020-10-18 15:52:36 -05:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | std::panic!("{}", "another one: }");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 15:52:36 -05:00
|
|
|
|
2020-10-19 14:14:05 -05:00
|
|
|
warning: panic message contains an unused formatting placeholder
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:16:25
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2020-10-18 16:36:00 -05:00
|
|
|
LL | core::panic!("Hello {}");
|
2020-10-20 15:25:42 -05:00
|
|
|
| ^^
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
|
2020-10-29 13:44:06 -05:00
|
|
|
help: add the missing argument
|
2020-10-18 16:36:00 -05:00
|
|
|
|
|
2020-10-20 15:25:42 -05:00
|
|
|
LL | core::panic!("Hello {}", ...);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 16:36:00 -05:00
|
|
|
help: or add a "{}" format string to use the message literally
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2020-10-18 16:36:00 -05:00
|
|
|
LL | core::panic!("{}", "Hello {}");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 15:52:36 -05:00
|
|
|
|
2020-10-20 15:25:42 -05:00
|
|
|
warning: panic message contains unused formatting placeholders
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:17:21
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2020-10-20 15:25:42 -05:00
|
|
|
LL | assert!(false, "{:03x} {test} bla");
|
|
|
|
| ^^^^^^ ^^^^^^
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
|
2020-10-29 13:44:06 -05:00
|
|
|
help: add the missing arguments
|
2020-10-18 16:36:00 -05:00
|
|
|
|
|
2020-10-20 15:25:42 -05:00
|
|
|
LL | assert!(false, "{:03x} {test} bla", ...);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 16:36:00 -05:00
|
|
|
help: or add a "{}" format string to use the message literally
|
2020-10-18 15:52:36 -05:00
|
|
|
|
|
2020-10-20 15:25:42 -05:00
|
|
|
LL | assert!(false, "{}", "{:03x} {test} bla");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 15:52:36 -05:00
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:19:20
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | assert!(false, S);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{}", S);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-01 15:30:09 -06:00
|
|
|
|
2021-08-16 10:26:08 -05:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:21:20
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, 123);
|
|
|
|
| ^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:26:08 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{}", 123);
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:23:20
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, Some(123));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:26:08 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>`
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{:?}", Some(123));
|
|
|
|
| +++++++
|
|
|
|
|
2020-10-20 15:59:53 -05:00
|
|
|
warning: panic message contains braces
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:25:27
|
2020-10-18 17:45:07 -05:00
|
|
|
|
|
|
|
|
LL | debug_assert!(false, "{{}} bla");
|
2020-10-20 15:59:53 -05:00
|
|
|
| ^^^^
|
2020-10-18 17:45:07 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string, but will be in Rust 2021
|
2020-10-18 17:45:07 -05:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | debug_assert!(false, "{}", "{{}} bla");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-18 17:45:07 -05:00
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:26:12
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | panic!(C);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | panic!("{}", C);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:27:12
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | panic!(S);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | panic!("{}", S);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:28:18
|
|
|
|
|
|
|
|
|
LL | unreachable!(S);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
|
2022-01-23 07:57:49 -06:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2022-01-23 07:57:49 -06:00
|
|
|
|
|
|
|
|
LL | unreachable!("{}", S);
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
|
|
|
--> $DIR/non-fmt-panic.rs:29:18
|
|
|
|
|
|
|
|
|
LL | unreachable!(S);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
|
2022-01-23 07:57:49 -06:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2022-01-23 07:57:49 -06:00
|
|
|
|
|
|
|
|
LL | unreachable!("{}", S);
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
|
|
|
--> $DIR/non-fmt-panic.rs:30:17
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | std::panic!(123);
|
|
|
|
| ^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `std::panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | std::panic!("{}", 123);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-01 15:30:09 -06:00
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(123);
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:31:18
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | core::panic!(&*"abc");
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `core::panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-01 15:30:09 -06:00
|
|
|
|
|
|
|
|
LL | core::panic!("{}", &*"abc");
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-01 15:30:09 -06:00
|
|
|
|
2021-08-16 10:26:08 -05:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:32:12
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | panic!(Some(123));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:26:08 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>`
|
2021-08-16 10:26:08 -05:00
|
|
|
|
|
|
|
|
LL | panic!("{:?}", Some(123));
|
|
|
|
| +++++++
|
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(Some(123));
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2020-10-20 15:59:53 -05:00
|
|
|
warning: panic message contains an unused formatting placeholder
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:33:12
|
2020-10-20 15:59:53 -05:00
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "}"));
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
|
2020-10-29 13:44:06 -05:00
|
|
|
help: add the missing argument
|
2020-10-20 15:59:53 -05:00
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "}"), ...);
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-20 15:59:53 -05:00
|
|
|
help: or add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", concat!("{", "}"));
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-20 15:59:53 -05:00
|
|
|
|
|
|
|
warning: panic message contains braces
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:34:5
|
2020-10-20 15:59:53 -05:00
|
|
|
|
|
|
|
|
LL | panic!(concat!("{", "{"));
|
2021-10-14 13:28:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-10-20 15:59:53 -05:00
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string, but will be in Rust 2021
|
2020-10-20 15:59:53 -05:00
|
|
|
help: add a "{}" format string to use the message literally
|
|
|
|
|
|
|
|
|
LL | panic!("{}", concat!("{", "{"));
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2020-10-20 15:59:53 -05:00
|
|
|
|
2020-10-29 16:21:40 -05:00
|
|
|
warning: panic message contains an unused formatting placeholder
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:36:37
|
2020-10-29 16:21:40 -05:00
|
|
|
|
|
|
|
|
LL | fancy_panic::fancy_panic!("test {} 123");
|
|
|
|
| ^^
|
|
|
|
|
|
2021-02-01 15:30:09 -06:00
|
|
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
|
|
|
|
|
2021-02-14 11:17:34 -06:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:46:12
|
2021-02-14 11:17:34 -06:00
|
|
|
|
|
|
|
|
LL | panic!(a!());
|
|
|
|
| ^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-14 11:17:34 -06:00
|
|
|
|
|
|
|
|
LL | panic!("{}", a!());
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-14 11:17:34 -06:00
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(a!());
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2021-02-14 11:17:34 -06:00
|
|
|
|
2021-02-14 11:53:10 -06:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:47:18
|
|
|
|
|
|
|
|
|
LL | unreachable!(a!());
|
|
|
|
| ^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
|
2022-01-23 07:57:49 -06:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2022-01-23 07:57:49 -06:00
|
|
|
|
|
|
|
|
LL | unreachable!("{}", a!());
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
|
|
|
--> $DIR/non-fmt-panic.rs:49:12
|
2021-02-14 11:53:10 -06:00
|
|
|
|
|
|
|
|
LL | panic!(format!("{}", 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here
|
2021-02-14 11:53:10 -06:00
|
|
|
help: remove the `format!(..)` macro call
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - panic!(format!("{}", 1));
|
|
|
|
LL + panic!("{}", 1);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2021-02-14 11:53:10 -06:00
|
|
|
|
2021-02-14 12:44:57 -06:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:50:18
|
|
|
|
|
|
|
|
|
LL | unreachable!(format!("{}", 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021
|
2022-01-23 07:57:49 -06:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: the `unreachable!()` macro supports formatting, so there's no need for the `format!()` macro here
|
2022-01-23 07:57:49 -06:00
|
|
|
help: remove the `format!(..)` macro call
|
|
|
|
|
|
|
|
|
LL - unreachable!(format!("{}", 1));
|
|
|
|
LL + unreachable!("{}", 1);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-01-23 07:57:49 -06:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
|
|
|
--> $DIR/non-fmt-panic.rs:51:20
|
2021-05-07 12:09:15 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, format!("{}", 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: the `assert!()` macro supports formatting, so there's no need for the `format!()` macro here
|
2021-05-07 12:09:15 -05:00
|
|
|
help: remove the `format!(..)` macro call
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - assert!(false, format!("{}", 1));
|
|
|
|
LL + assert!(false, "{}", 1);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2021-05-07 12:09:15 -05:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:52:26
|
2021-05-07 12:09:15 -05:00
|
|
|
|
|
|
|
|
LL | debug_assert!(false, format!("{}", 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `debug_assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: the `debug_assert!()` macro supports formatting, so there's no need for the `format!()` macro here
|
2021-05-07 12:09:15 -05:00
|
|
|
help: remove the `format!(..)` macro call
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - debug_assert!(false, format!("{}", 1));
|
|
|
|
LL + debug_assert!(false, "{}", 1);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2021-05-07 12:09:15 -05:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:54:12
|
2021-02-14 12:44:57 -06:00
|
|
|
|
|
|
|
|
LL | panic![123];
|
|
|
|
| ^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-14 12:44:57 -06:00
|
|
|
|
|
|
|
|
LL | panic!["{}", 123];
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-14 12:44:57 -06:00
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(123);
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~ ~
|
2021-02-14 12:44:57 -06:00
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:55:12
|
2021-02-14 12:44:57 -06:00
|
|
|
|
|
|
|
|
LL | panic!{123};
|
|
|
|
| ^^^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-06-27 09:47:26 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-02-14 12:44:57 -06:00
|
|
|
|
|
|
|
|
LL | panic!{"{}", 123};
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++
|
2021-02-14 12:44:57 -06:00
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(123);
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~ ~
|
2021-02-14 12:44:57 -06:00
|
|
|
|
2021-08-16 10:33:42 -05:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:72:12
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!(v);
|
|
|
|
| ------ ^
|
|
|
|
| |
|
|
|
|
| help: use std::panic::panic_any instead: `std::panic::panic_any`
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:33:42 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:73:20
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:35:49 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:77:12
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!(v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:33:42 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{:?}" format string to use the `Debug` implementation of `T`
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!("{:?}", v);
|
|
|
|
| +++++++
|
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(v);
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:78:20
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:35:49 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{:?}" format string to use the `Debug` implementation of `T`
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{:?}", v);
|
|
|
|
| +++++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:82:12
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!(v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:33:42 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!("{}", v);
|
|
|
|
| +++++
|
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(v);
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:83:20
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:35:49 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{}", v);
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:87:12
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!(v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:33:42 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-08-16 10:33:42 -05:00
|
|
|
|
|
|
|
|
LL | panic!("{}", v);
|
|
|
|
| +++++
|
|
|
|
help: or use std::panic::panic_any instead
|
|
|
|
|
|
|
|
|
LL | std::panic::panic_any(v);
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2021-08-16 10:35:49 -05:00
|
|
|
warning: panic message is not a string literal
|
2022-01-23 07:57:49 -06:00
|
|
|
--> $DIR/non-fmt-panic.rs:88:20
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, v);
|
|
|
|
| ^
|
|
|
|
|
|
2022-06-27 10:33:57 -05:00
|
|
|
= note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021
|
2021-08-16 10:35:49 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
|
2022-06-27 10:33:57 -05:00
|
|
|
help: add a "{}" format string to `Display` the message
|
2021-08-16 10:35:49 -05:00
|
|
|
|
|
|
|
|
LL | assert!(false, "{}", v);
|
|
|
|
| +++++
|
|
|
|
|
2022-01-23 07:57:49 -06:00
|
|
|
warning: 35 warnings emitted
|
2020-10-18 15:52:36 -05:00
|
|
|
|