Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -223,7 +223,7 @@ impl TokenBuffer {
///
/// *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())
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -629,7 +629,7 @@ pub use error::parse_error;
/// #
/// # 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,
Expand Down
4 changes: 2 additions & 2 deletions src/synom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -315,7 +315,7 @@ pub trait Parser: Sized {
///
/// *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())
}
Expand Down