|
46 | 46 | #![doc(html_root_url = "https://docs.rs/proc-macro2/0.4.9")] |
47 | 47 | #![cfg_attr(feature = "nightly", feature(proc_macro_raw_ident, proc_macro_span))] |
48 | 48 |
|
49 | | -#[cfg(feature = "proc-macro")] |
| 49 | +#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))] |
50 | 50 | extern crate proc_macro; |
51 | 51 | extern crate unicode_xid; |
52 | 52 |
|
@@ -146,14 +146,14 @@ impl FromStr for TokenStream { |
146 | 146 | } |
147 | 147 | } |
148 | 148 |
|
149 | | -#[cfg(feature = "proc-macro")] |
| 149 | +#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))] |
150 | 150 | impl From<proc_macro::TokenStream> for TokenStream { |
151 | 151 | fn from(inner: proc_macro::TokenStream) -> TokenStream { |
152 | 152 | TokenStream::_new(inner.into()) |
153 | 153 | } |
154 | 154 | } |
155 | 155 |
|
156 | | -#[cfg(feature = "proc-macro")] |
| 156 | +#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))] |
157 | 157 | impl From<TokenStream> for proc_macro::TokenStream { |
158 | 158 | fn from(inner: TokenStream) -> proc_macro::TokenStream { |
159 | 159 | inner.inner.into() |
@@ -318,7 +318,7 @@ impl Span { |
318 | 318 | } |
319 | 319 |
|
320 | 320 | /// This method is only available when the `"nightly"` feature is enabled. |
321 | | - #[cfg(all(feature = "nightly", feature = "proc-macro"))] |
| 321 | + #[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "nightly", feature = "proc-macro"))] |
322 | 322 | pub fn unstable(self) -> proc_macro::Span { |
323 | 323 | self.inner.unstable() |
324 | 324 | } |
|
0 commit comments