Skip to content

Commit 9ed877f

Browse files
committed
Expand assert!(expr) to panic() function instead of panic!() macro.
The panic message might contain braces which should never be interpreted as format placeholders, which panic!() will do in a future edition.
1 parent a776e39 commit 9ed877f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/macros/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,7 @@ pub(crate) mod builtin {
12171217
#[rustc_builtin_macro]
12181218
#[macro_export]
12191219
#[rustc_diagnostic_item = "assert_macro"]
1220+
#[allow_internal_unstable(core_panic)]
12201221
macro_rules! assert {
12211222
($cond:expr $(,)?) => {{ /* compiler built-in */ }};
12221223
($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }};

0 commit comments

Comments
 (0)