about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiv Kaminer <nivkner@zoho.com>2018-12-19 10:54:35 +0200
committerNiv Kaminer <nivkner@zoho.com>2018-12-19 10:54:35 +0200
commit957a9c7c666801019478f1ff1535d8395127fa6f (patch)
tree2aba30ee74c5efcf1904bc5dc5fd9ca3bda16009
parentd88d319a5d9d8f339d9d0fde71bb3b9979c9093b (diff)
downloadrust-957a9c7c666801019478f1ff1535d8395127fa6f.tar.gz
rust-957a9c7c666801019478f1ff1535d8395127fa6f.zip
Revert "FIXME(53451) remove fixme and unnecessary pubs"
This reverts commit d88d319a5d9d8f339d9d0fde71bb3b9979c9093b.
-rw-r--r--src/libproc_macro/bridge/client.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libproc_macro/bridge/client.rs b/src/libproc_macro/bridge/client.rs
index d6c2848b034..f5e12713e4e 100644
--- a/src/libproc_macro/bridge/client.rs
+++ b/src/libproc_macro/bridge/client.rs
@@ -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),)*
@@ -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> {
@@ -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> {
@@ -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,
         }
     }