@@ -26,22 +26,13 @@ LL | assert!(true, "true message");
2626 = help: remove it
2727 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
2828
29- error: `assert!(false, "false message" )` should probably be replaced
29+ error: `assert!(false, $crate::const_format_args!($($t)+) )` should probably be replaced
3030 --> $DIR/assertions_on_constants.rs:14:5
3131 |
3232LL | assert!(false, "false message");
3333 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3434 |
35- = help: use `panic!("false message")` or `unreachable!("false message")`
36- = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
37-
38- error: `assert!(false, msg.to_uppercase())` should probably be replaced
39- --> $DIR/assertions_on_constants.rs:17:5
40- |
41- LL | assert!(false, msg.to_uppercase());
42- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43- |
44- = help: use `panic!(msg.to_uppercase())` or `unreachable!(msg.to_uppercase())`
35+ = help: use `panic!($crate::const_format_args!($($t)+))` or `unreachable!($crate::const_format_args!($($t)+))`
4536 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
4637
4738error: `assert!(true)` will be optimized out by the compiler
@@ -62,13 +53,13 @@ LL | assert!(C);
6253 = help: use `panic!()` or `unreachable!()`
6354 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
6455
65- error: `assert!(false, "C message" )` should probably be replaced
56+ error: `assert!(false, $crate::const_format_args!($($t)+) )` should probably be replaced
6657 --> $DIR/assertions_on_constants.rs:24:5
6758 |
6859LL | assert!(C, "C message");
6960 | ^^^^^^^^^^^^^^^^^^^^^^^
7061 |
71- = help: use `panic!("C message") ` or `unreachable!("C message" )`
62+ = help: use `panic!($crate::const_format_args!($($t)+)) ` or `unreachable!($crate::const_format_args!($($t)+) )`
7263 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
7364
7465error: `debug_assert!(true)` will be optimized out by the compiler
@@ -80,5 +71,5 @@ LL | debug_assert!(true);
8071 = help: remove it
8172 = note: this error originates in the macro `$crate::assert` (in Nightly builds, run with -Z macro-backtrace for more info)
8273
83- error: aborting due to 9 previous errors
74+ error: aborting due to 8 previous errors
8475
0 commit comments