@@ -31,7 +31,7 @@ macro_rules! panic {
31
31
/// ```
32
32
#[ macro_export]
33
33
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
34
- #[ allow_internal_unstable( core_panic) ]
34
+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
35
35
macro_rules! assert_eq {
36
36
( $left: expr, $right: expr $( , ) ?) => ( {
37
37
match ( & $left, & $right) {
@@ -54,7 +54,7 @@ macro_rules! assert_eq {
54
54
// The reborrows below are intentional. Without them, the stack slot for the
55
55
// borrow is initialized even before the values are compared, leading to a
56
56
// 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) +) ) ) ;
58
58
}
59
59
}
60
60
}
@@ -80,7 +80,7 @@ macro_rules! assert_eq {
80
80
/// ```
81
81
#[ macro_export]
82
82
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
83
- #[ allow_internal_unstable( core_panic) ]
83
+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
84
84
macro_rules! assert_ne {
85
85
( $left: expr, $right: expr $( , ) ?) => ( {
86
86
match ( & $left, & $right) {
@@ -103,7 +103,7 @@ macro_rules! assert_ne {
103
103
// The reborrows below are intentional. Without them, the stack slot for the
104
104
// borrow is initialized even before the values are compared, leading to a
105
105
// 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) +) ) ) ;
107
107
}
108
108
}
109
109
}
@@ -137,7 +137,7 @@ macro_rules! assert_ne {
137
137
/// assert_matches!(c, Ok(x) | Err(x) if x.len() < 100);
138
138
/// ```
139
139
#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
140
- #[ allow_internal_unstable( core_panic) ]
140
+ #[ allow_internal_unstable( core_panic, const_format_args ) ]
141
141
#[ rustc_macro_transparency = "semitransparent" ]
142
142
pub macro assert_matches {
143
143
( $left: expr, $( |) ? $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => ( {
@@ -159,7 +159,7 @@ pub macro assert_matches {
159
159
$crate:: panicking:: assert_matches_failed (
160
160
left_val,
161
161
$crate:: stringify!( $( $pattern) |+ $( if $guard) ?) ,
162
- $crate:: option:: Option :: Some ( $crate:: format_args !( $( $arg) +) )
162
+ $crate:: option:: Option :: Some ( $crate:: const_format_args !( $( $arg) +) )
163
163
) ;
164
164
}
165
165
}
0 commit comments