Document what feature everything requires
diff --git a/src/lib.rs b/src/lib.rs
index 948dd3e..7d236db 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -418,6 +418,8 @@
/// # fn visit_bin_op(&mut self, node: &'ast BinOp);
/// }
/// ```
+ ///
+ /// *This module is available if Syn is built with the `"visit"` feature.*
#[cfg(feature = "visit")]
pub mod visit;
@@ -453,6 +455,9 @@
/// # fn visit_bin_op_mut(&mut self, node: &mut BinOp);
/// }
/// ```
+ ///
+ /// *This module is available if Syn is built with the `"visit-mut"`
+ /// feature.*
#[cfg(feature = "visit-mut")]
pub mod visit_mut;
@@ -489,6 +494,8 @@
/// # fn fold_bin_op(&mut self, node: BinOp) -> BinOp;
/// }
/// ```
+ ///
+ /// *This module is available if Syn is built with the `"fold"` feature.*
#[cfg(feature = "fold")]
pub mod fold;
@@ -528,6 +535,8 @@
///
/// [`syn::parse2`]: fn.parse2.html
///
+/// *This function is available if Syn is built with the `"parsing"` feature.*
+///
/// # Examples
///
/// ```rust
@@ -577,6 +586,8 @@
///
/// [`Macro`]: struct.Macro.html
/// [`syn::parse`]: fn.parse.html
+///
+/// *This function is available if Syn is built with the `"parsing"` feature.*
#[cfg(feature = "parsing")]
pub fn parse2<T>(tokens: proc_macro2::TokenStream) -> Result<T, ParseError>
where
@@ -605,6 +616,8 @@
/// Parse a string of Rust code into the chosen syntax tree node.
///
+/// *This function is available if Syn is built with the `"parsing"` feature.*
+///
/// # Examples
///
/// ```rust
@@ -643,6 +656,8 @@
///
/// If present, either of these would be an error using `from_str`.
///
+/// *This function is available if Syn is built with the `"parsing"` feature.*
+///
/// # Examples
///
/// ```rust,no_run
@@ -725,6 +740,9 @@
/// }
/// ```
///
+/// *This macro is available if Syn is built with both the `"parsing"` and
+/// `"printing"` features.*
+///
/// # Example
///
/// The following helper function adds a bound `T: HeapSize` to every type