We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
panic!
1 parent af1c39c commit 3828eeaCopy full SHA for 3828eea
src/libcore/macros.rs
@@ -56,7 +56,8 @@ macro_rules! panic {
56
macro_rules! assert {
57
($cond:expr) => (
58
if !$cond {
59
- panic!(concat!("assertion failed: ", stringify!($cond)))
+ const MSG: &'static str = concat!("assertion failed: ", stringify!($cond));
60
+ panic!(MSG)
61
}
62
);
63
($cond:expr, $($arg:tt)+) => (
src/libcoretest/nonzero.rs
@@ -95,6 +95,6 @@ fn test_match_option_string() {
95
let five = "Five".to_string();
96
match Some(five) {
97
Some(s) => assert_eq!(s, "Five"),
98
- None => panic!("unexpected None while matching on Some(String { ... })")
+ None => panic!("{}", "unexpected None while matching on Some(String { ... })")
99
100
0 commit comments