Skip to content

Commit 957a9c7

Browse files
committed
Revert "FIXME(53451) remove fixme and unnecessary pubs"
This reverts commit d88d319.
1 parent d88d319 commit 957a9c7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/libproc_macro/bridge/client.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ macro_rules! define_handles {
2525
}
2626

2727
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 {
2930
static COUNTERS: HandleCounters = HandleCounters {
3031
$($oty: AtomicUsize::new(1),)*
3132
$($ity: AtomicUsize::new(1),)*
@@ -344,7 +345,9 @@ pub struct Client<F> {
344345
pub(super) f: F,
345346
}
346347

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(
348351
mut bridge: Bridge,
349352
f: fn(::TokenStream) -> ::TokenStream,
350353
) -> Buffer<u8> {
@@ -389,13 +392,15 @@ impl Client<fn(::TokenStream) -> ::TokenStream> {
389392
pub const fn expand1(f: fn(::TokenStream) -> ::TokenStream) -> Self {
390393
Client {
391394
get_handle_counters: HandleCounters::get,
392-
run: run_expand1,
395+
run: __run_expand1,
393396
f,
394397
}
395398
}
396399
}
397400

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(
399404
mut bridge: Bridge,
400405
f: fn(::TokenStream, ::TokenStream) -> ::TokenStream,
401406
) -> Buffer<u8> {
@@ -441,7 +446,7 @@ impl Client<fn(::TokenStream, ::TokenStream) -> ::TokenStream> {
441446
pub const fn expand2(f: fn(::TokenStream, ::TokenStream) -> ::TokenStream) -> Self {
442447
Client {
443448
get_handle_counters: HandleCounters::get,
444-
run: run_expand2,
449+
run: __run_expand2,
445450
f,
446451
}
447452
}

0 commit comments

Comments
 (0)