Ignore proc-macro feature on wasm-target
diff --git a/src/buffer.rs b/src/buffer.rs
index cc05485..da37427 100644
--- a/src/buffer.rs
+++ b/src/buffer.rs
@@ -127,7 +127,7 @@
 // and caution should be used when editing it. The public-facing interface is
 // 100% safe but the implementation is fragile internally.
 
-#[cfg(feature = "proc-macro")]
+#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))]
 use proc_macro as pm;
 use proc_macro2::{Delimiter, Ident, Literal, Span, TokenStream};
 use proc_macro2::{Group, Punct, TokenTree};
@@ -223,7 +223,7 @@
     ///
     /// *This method is available if Syn is built with both the `"parsing"` and
     /// `"proc-macro"` features.*
-    #[cfg(feature = "proc-macro")]
+    #[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))]
     pub fn new(stream: pm::TokenStream) -> TokenBuffer {
         Self::new2(stream.into())
     }
diff --git a/src/lib.rs b/src/lib.rs
index 37ff54e..1f02659 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -292,7 +292,7 @@
     )
 )]
 
-#[cfg(feature = "proc-macro")]
+#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))]
 extern crate proc_macro;
 extern crate proc_macro2;
 extern crate unicode_xid;
@@ -629,7 +629,7 @@
 /// #
 /// # fn main() {}
 /// ```
-#[cfg(all(feature = "parsing", feature = "proc-macro"))]
+#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "parsing", feature = "proc-macro"))]
 pub fn parse<T>(tokens: proc_macro::TokenStream) -> Result<T, ParseError>
 where
     T: Synom,
diff --git a/src/synom.rs b/src/synom.rs
index 2b0538d..e589336 100644
--- a/src/synom.rs
+++ b/src/synom.rs
@@ -150,7 +150,7 @@
 //!
 //! *This module is available if Syn is built with the `"parsing"` feature.*
 
-#[cfg(feature = "proc-macro")]
+#[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))]
 use proc_macro;
 use proc_macro2::{Delimiter, Group, Ident, Literal, Punct, TokenStream, TokenTree};
 
@@ -315,7 +315,7 @@
     ///
     /// *This method is available if Syn is built with both the `"parsing"` and
     /// `"proc-macro"` features.*
-    #[cfg(feature = "proc-macro")]
+    #[cfg(all(not(all(target_arch = "wasm32", target_os = "unknown")), feature = "proc-macro"))]
     fn parse(self, tokens: proc_macro::TokenStream) -> Result<Self::Output, ParseError> {
         self.parse2(tokens.into())
     }