Skip to content

Commit

Permalink
Revert "FIXME(53451) remove fixme and unnecessary pubs"
Browse files Browse the repository at this point in the history
This reverts commit d88d319.
  • Loading branch information
nivkner committed Dec 19, 2018
1 parent d88d319 commit 957a9c7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/libproc_macro/bridge/client.rs
Expand Up @@ -25,7 +25,8 @@ macro_rules! define_handles {
}

impl HandleCounters {
extern "C" fn get() -> &'static Self {
// FIXME(#53451) public to work around `Cannot create local mono-item` ICE.
pub extern "C" fn get() -> &'static Self {
static COUNTERS: HandleCounters = HandleCounters {
$($oty: AtomicUsize::new(1),)*
$($ity: AtomicUsize::new(1),)*
Expand Down Expand Up @@ -344,7 +345,9 @@ pub struct Client<F> {
pub(super) f: F,
}

extern "C" fn run_expand1(
// FIXME(#53451) public to work around `Cannot create local mono-item` ICE,
// affecting not only the function itself, but also the `BridgeState` `thread_local!`.
pub extern "C" fn __run_expand1(
mut bridge: Bridge,
f: fn(::TokenStream) -> ::TokenStream,
) -> Buffer<u8> {
Expand Down Expand Up @@ -389,13 +392,15 @@ impl Client<fn(::TokenStream) -> ::TokenStream> {
pub const fn expand1(f: fn(::TokenStream) -> ::TokenStream) -> Self {
Client {
get_handle_counters: HandleCounters::get,
run: run_expand1,
run: __run_expand1,
f,
}
}
}

extern "C" fn run_expand2(
// FIXME(#53451) public to work around `Cannot create local mono-item` ICE,
// affecting not only the function itself, but also the `BridgeState` `thread_local!`.
pub extern "C" fn __run_expand2(
mut bridge: Bridge,
f: fn(::TokenStream, ::TokenStream) -> ::TokenStream,
) -> Buffer<u8> {
Expand Down Expand Up @@ -441,7 +446,7 @@ impl Client<fn(::TokenStream, ::TokenStream) -> ::TokenStream> {
pub const fn expand2(f: fn(::TokenStream, ::TokenStream) -> ::TokenStream) -> Self {
Client {
get_handle_counters: HandleCounters::get,
run: run_expand2,
run: __run_expand2,
f,
}
}
Expand Down

0 comments on commit 957a9c7

Please sign in to comment.