@@ -31,7 +31,7 @@ macro_rules! panic {
3131/// ```
3232#[ macro_export]
3333#[ stable( feature = "rust1" , since = "1.0.0" ) ]
34- #[ allow_internal_unstable( core_panic) ]
34+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
3535macro_rules! assert_eq {
3636 ( $left: expr, $right: expr $( , ) ?) => ( {
3737 match ( & $left, & $right) {
@@ -54,7 +54,7 @@ macro_rules! assert_eq {
5454 // The reborrows below are intentional. Without them, the stack slot for the
5555 // borrow is initialized even before the values are compared, leading to a
5656 // noticeable slow down.
57- $crate:: panicking:: assert_failed( kind, & * left_val, & * right_val, $crate:: option:: Option :: Some ( $crate:: format_args !( $( $arg) +) ) ) ;
57+ $crate:: panicking:: assert_failed( kind, & * left_val, & * right_val, $crate:: option:: Option :: Some ( $crate:: const_format_args !( $( $arg) +) ) ) ;
5858 }
5959 }
6060 }
@@ -80,7 +80,7 @@ macro_rules! assert_eq {
8080/// ```
8181#[ macro_export]
8282#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
83- #[ allow_internal_unstable( core_panic) ]
83+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
8484macro_rules! assert_ne {
8585 ( $left: expr, $right: expr $( , ) ?) => ( {
8686 match ( & $left, & $right) {
@@ -103,7 +103,7 @@ macro_rules! assert_ne {
103103 // The reborrows below are intentional. Without them, the stack slot for the
104104 // borrow is initialized even before the values are compared, leading to a
105105 // noticeable slow down.
106- $crate:: panicking:: assert_failed( kind, & * left_val, & * right_val, $crate:: option:: Option :: Some ( $crate:: format_args !( $( $arg) +) ) ) ;
106+ $crate:: panicking:: assert_failed( kind, & * left_val, & * right_val, $crate:: option:: Option :: Some ( $crate:: const_format_args !( $( $arg) +) ) ) ;
107107 }
108108 }
109109 }
@@ -137,7 +137,7 @@ macro_rules! assert_ne {
137137/// assert_matches!(c, Ok(x) | Err(x) if x.len() < 100);
138138/// ```
139139#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
140- #[ allow_internal_unstable( core_panic) ]
140+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
141141#[ rustc_macro_transparency = "semitransparent" ]
142142pub macro assert_matches {
143143 ( $left: expr, $( |) ? $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => ( {
@@ -159,7 +159,7 @@ pub macro assert_matches {
159159 $crate:: panicking:: assert_matches_failed (
160160 left_val,
161161 $crate:: stringify!( $( $pattern) |+ $( if $guard) ?) ,
162- $crate:: option:: Option :: Some ( $crate:: format_args !( $( $arg) +) )
162+ $crate:: option:: Option :: Some ( $crate:: const_format_args !( $( $arg) +) )
163163 ) ;
164164 }
165165 }
0 commit comments