@@ -25,7 +25,8 @@ macro_rules! define_handles {
25
25
}
26
26
27
27
impl HandleCounters {
28
- extern "C" fn get( ) -> & ' static Self {
28
+ // FIXME(#53451) public to work around `Cannot create local mono-item` ICE.
29
+ pub extern "C" fn get( ) -> & ' static Self {
29
30
static COUNTERS : HandleCounters = HandleCounters {
30
31
$( $oty: AtomicUsize :: new( 1 ) , ) *
31
32
$( $ity: AtomicUsize :: new( 1 ) , ) *
@@ -344,7 +345,9 @@ pub struct Client<F> {
344
345
pub ( super ) f : F ,
345
346
}
346
347
347
- extern "C" fn run_expand1 (
348
+ // FIXME(#53451) public to work around `Cannot create local mono-item` ICE,
349
+ // affecting not only the function itself, but also the `BridgeState` `thread_local!`.
350
+ pub extern "C" fn __run_expand1 (
348
351
mut bridge : Bridge ,
349
352
f : fn ( :: TokenStream ) -> :: TokenStream ,
350
353
) -> Buffer < u8 > {
@@ -389,13 +392,15 @@ impl Client<fn(::TokenStream) -> ::TokenStream> {
389
392
pub const fn expand1 ( f : fn ( :: TokenStream ) -> :: TokenStream ) -> Self {
390
393
Client {
391
394
get_handle_counters : HandleCounters :: get,
392
- run : run_expand1 ,
395
+ run : __run_expand1 ,
393
396
f,
394
397
}
395
398
}
396
399
}
397
400
398
- extern "C" fn run_expand2 (
401
+ // FIXME(#53451) public to work around `Cannot create local mono-item` ICE,
402
+ // affecting not only the function itself, but also the `BridgeState` `thread_local!`.
403
+ pub extern "C" fn __run_expand2 (
399
404
mut bridge : Bridge ,
400
405
f : fn ( :: TokenStream , :: TokenStream ) -> :: TokenStream ,
401
406
) -> Buffer < u8 > {
@@ -441,7 +446,7 @@ impl Client<fn(::TokenStream, ::TokenStream) -> ::TokenStream> {
441
446
pub const fn expand2 ( f : fn ( :: TokenStream , :: TokenStream ) -> :: TokenStream ) -> Self {
442
447
Client {
443
448
get_handle_counters : HandleCounters :: get,
444
- run : run_expand2 ,
449
+ run : __run_expand2 ,
445
450
f,
446
451
}
447
452
}
0 commit comments