File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -838,6 +838,7 @@ pub(crate) mod builtin {
838
838
}
839
839
840
840
/// Same as `format_args`, but can be used in some const contexts.
841
+ #[ cfg( not( bootstrap) ) ]
841
842
#[ unstable( feature = "const_format_args" , issue = "none" ) ]
842
843
#[ allow_internal_unstable( fmt_internals, const_fmt_arguments_new) ]
843
844
#[ rustc_builtin_macro]
@@ -847,6 +848,16 @@ pub(crate) mod builtin {
847
848
( $fmt: expr, $( $args: tt) * ) => { { /* compiler built-in */ } } ;
848
849
}
849
850
851
+ /// Same as `format_args`, but can be used in some const contexts.
852
+ #[ cfg( bootstrap) ]
853
+ #[ unstable( feature = "const_format_args" , issue = "none" ) ]
854
+ #[ macro_export]
855
+ macro_rules! const_format_args {
856
+ ( $( $t: tt) * ) => {
857
+ $crate :: format_args!( $( $t) * )
858
+ }
859
+ }
860
+
850
861
/// Same as `format_args`, but adds a newline in the end.
851
862
#[ unstable(
852
863
feature = "format_args_nl" ,
You can’t perform that action at this time.
0 commit comments