[−][src]Function syn::parse2
pub fn parse2<T>(tokens: TokenStream) -> Result<T, ParseError> where
T: Synom,
Parse a proc-macro2 token stream into the chosen syntax tree node.
This function parses a proc_macro2::TokenStream
which is commonly useful
when the input comes from a node of the Syn syntax tree, for example the tts
of a Macro
node. When in a procedural macro parsing the
proc_macro::TokenStream
provided by the compiler, use syn::parse
instead.
This function is available if Syn is built with the "parsing"
feature.