Identify parser functions as conditional
diff --git a/src/attr.rs b/src/attr.rs
index 76f950b..26037bc 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -129,6 +129,9 @@
}
/// Parses zero or more outer attributes from the stream.
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_outer(input: ParseStream) -> Result<Vec<Self>> {
let mut attrs = Vec::new();
@@ -139,6 +142,9 @@
}
/// Parses zero or more inner attributes from the stream.
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_inner(input: ParseStream) -> Result<Vec<Self>> {
let mut attrs = Vec::new();
diff --git a/src/expr.rs b/src/expr.rs
index 4ccc14d..809463a 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -2428,6 +2428,9 @@
/// Parse the body of a block as zero or more statements, possibly
/// including one trailing expression.
///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
+ ///
/// # Example
///
/// ```
diff --git a/src/path.rs b/src/path.rs
index fea3b0f..4872187 100644
--- a/src/path.rs
+++ b/src/path.rs
@@ -348,6 +348,9 @@
impl Path {
/// Parse a `Path` containing no path arguments on any of its segments.
///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
+ ///
/// # Example
///
/// ```
diff --git a/src/punctuated.rs b/src/punctuated.rs
index 5acb21d..7bb7368 100644
--- a/src/punctuated.rs
+++ b/src/punctuated.rs
@@ -248,6 +248,9 @@
///
/// Parsing continues until the end of this parse stream. The entire content
/// of this parse stream must consist of `T` and `P`.
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_terminated(input: ParseStream) -> Result<Self>
where
@@ -265,6 +268,9 @@
/// to be parsed.
///
/// [`parse_terminated`]: #method.parse_terminated
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_terminated_with(
input: ParseStream,
@@ -298,6 +304,9 @@
/// the stream. This method returns upon parsing a `T` and observing that it
/// is not followed by a `P`, even if there are remaining tokens in the
/// stream.
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_separated_nonempty(input: ParseStream) -> Result<Self>
where
@@ -315,6 +324,9 @@
/// the entire content of this stream.
///
/// [`parse_separated_nonempty`]: #method.parse_separated_nonempty
+ ///
+ /// *This function is available if Syn is built with the `"parsing"`
+ /// feature.*
#[cfg(feature = "parsing")]
pub fn parse_separated_nonempty_with(
input: ParseStream,