@@ -401,7 +401,8 @@ fn run_client<A: for<'a, 's> DecodeMut<'a, 's, ()>, R: Encode<()>>(
401
401
}
402
402
403
403
impl 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) ) ]
405
406
pub const fn expand1 ( f : fn ( crate :: TokenStream ) -> crate :: TokenStream ) -> Self {
406
407
extern "C" fn run (
407
408
bridge : Bridge < ' _ > ,
@@ -414,7 +415,8 @@ impl Client<fn(crate::TokenStream) -> crate::TokenStream> {
414
415
}
415
416
416
417
impl 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) ) ]
418
420
pub const fn expand2 (
419
421
f : fn ( crate :: TokenStream , crate :: TokenStream ) -> crate :: TokenStream ,
420
422
) -> Self {
@@ -459,7 +461,8 @@ impl ProcMacro {
459
461
}
460
462
}
461
463
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) ) ]
463
466
pub const fn custom_derive (
464
467
trait_name : & ' static str ,
465
468
attributes : & ' static [ & ' static str ] ,
@@ -468,15 +471,17 @@ impl ProcMacro {
468
471
ProcMacro :: CustomDerive { trait_name, attributes, client : Client :: expand1 ( expand) }
469
472
}
470
473
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) ) ]
472
476
pub const fn attr (
473
477
name : & ' static str ,
474
478
expand : fn ( crate :: TokenStream , crate :: TokenStream ) -> crate :: TokenStream ,
475
479
) -> Self {
476
480
ProcMacro :: Attr { name, client : Client :: expand2 ( expand) }
477
481
}
478
482
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) ) ]
480
485
pub const fn bang (
481
486
name : & ' static str ,
482
487
expand : fn ( crate :: TokenStream ) -> crate :: TokenStream ,
0 commit comments