@@ -401,7 +401,8 @@ fn run_client<A: for<'a, 's> DecodeMut<'a, 's, ()>, R: Encode<()>>(
401401}
402402
403403impl Client < fn ( crate :: TokenStream ) -> crate :: TokenStream > {
404- #[ allow_internal_unstable( const_fn) ]
404+ #[ cfg_attr( not( bootstrap) , rustc_allow_const_fn_unstable( const_fn) ) ]
405+ #[ cfg_attr( bootstrap, allow_internal_unstable( const_fn) ) ]
405406 pub const fn expand1 ( f : fn ( crate :: TokenStream ) -> crate :: TokenStream ) -> Self {
406407 extern "C" fn run (
407408 bridge : Bridge < ' _ > ,
@@ -414,7 +415,8 @@ impl Client<fn(crate::TokenStream) -> crate::TokenStream> {
414415}
415416
416417impl Client < fn ( crate :: TokenStream , crate :: TokenStream ) -> crate :: TokenStream > {
417- #[ allow_internal_unstable( const_fn) ]
418+ #[ cfg_attr( not( bootstrap) , rustc_allow_const_fn_unstable( const_fn) ) ]
419+ #[ cfg_attr( bootstrap, allow_internal_unstable( const_fn) ) ]
418420 pub const fn expand2 (
419421 f : fn ( crate :: TokenStream , crate :: TokenStream ) -> crate :: TokenStream ,
420422 ) -> Self {
@@ -459,7 +461,8 @@ impl ProcMacro {
459461 }
460462 }
461463
462- #[ allow_internal_unstable( const_fn) ]
464+ #[ cfg_attr( not( bootstrap) , rustc_allow_const_fn_unstable( const_fn) ) ]
465+ #[ cfg_attr( bootstrap, allow_internal_unstable( const_fn) ) ]
463466 pub const fn custom_derive (
464467 trait_name : & ' static str ,
465468 attributes : & ' static [ & ' static str ] ,
@@ -468,15 +471,17 @@ impl ProcMacro {
468471 ProcMacro :: CustomDerive { trait_name, attributes, client : Client :: expand1 ( expand) }
469472 }
470473
471- #[ allow_internal_unstable( const_fn) ]
474+ #[ cfg_attr( not( bootstrap) , rustc_allow_const_fn_unstable( const_fn) ) ]
475+ #[ cfg_attr( bootstrap, allow_internal_unstable( const_fn) ) ]
472476 pub const fn attr (
473477 name : & ' static str ,
474478 expand : fn ( crate :: TokenStream , crate :: TokenStream ) -> crate :: TokenStream ,
475479 ) -> Self {
476480 ProcMacro :: Attr { name, client : Client :: expand2 ( expand) }
477481 }
478482
479- #[ allow_internal_unstable( const_fn) ]
483+ #[ cfg_attr( not( bootstrap) , rustc_allow_const_fn_unstable( const_fn) ) ]
484+ #[ cfg_attr( bootstrap, allow_internal_unstable( const_fn) ) ]
480485 pub const fn bang (
481486 name : & ' static str ,
482487 expand : fn ( crate :: TokenStream ) -> crate :: TokenStream ,
0 commit comments