Registry / other / syn
library2.0.114rscratesunverified

Parser for Rust source code, used in procedural macros.

# Cargo.toml [dependencies] syn = "2.0.114"
INSTALL
IMPORT
SIG · SYN
S
syn
otherrustv2.0.114
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_macro_input
use syn::parse_macro_input;

Parse a TokenStream into a Rust syntax tree node.

use syn::parse_macro_input; // Typically used inside a proc-macro function: // #[proc_macro] // pub fn my_macro(input: TokenStream) -> TokenStream { // let parsed = parse_macro_input!(input as syn::ItemFn); // // ... // }
Debug
Known issues
breakingSyn 2.0 introduced breaking changes in API and feature flags.
fix
Check migration guide from syn 1.x to 2.x; enable features like "full" or "derive" as needed.
affects: >=2.0.0
Upgrade
Version history
2.0.114latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
Resources