Crate features / syn
Feature flags · syn 3.0.9 · from crates.io 2026-10-24
syn features: what each one does, and the line to copy
Short answersyn 3.0.9 has 11 features. By default it turns on derive, parsing, printing, clone-impls, proc-macro; add default-features = false to start from nothing. It needs Rust 1.71 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
clone-impls | yes | nothing else (a switch the code checks) |
derive | yes | nothing else (a switch the code checks) |
extra-traits | nothing else (a switch the code checks) | |
fold | nothing else (a switch the code checks) | |
full | nothing else (a switch the code checks) | |
parsing | yes | nothing else (a switch the code checks) |
printing | yes | dep:quote |
proc-macro | yes | proc-macro2/proc-macro, quote?/proc-macro |
test | syn-test-suite/all-features | |
visit | nothing else (a switch the code checks) | |
visit-mut | nothing else (a switch the code checks) |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version syn declares (rust-version), and the release that changed it:
- 1.0.78 (2021-10-03): Rust 1.31
- 2.0.0 (2023-03-17): Rust 1.56
- 2.0.54 (2024-03-24): Rust 1.60
- 2.0.55 (2024-03-24): Rust 1.56
- 2.0.57 (2024-03-30): Rust 1.60
- 2.0.68 (2024-06-23): Rust 1.61
- 2.0.107 (2025-10-18): Rust 1.68
- 2.0.115 (2026-02-12): Rust 1.71
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p syn --precise <version>, or use resolver 3, which picks compatible versions for you.
More on syn
Real downloads, dependents and alternatives: syn crate data (8.4M real downloads a day, 18,848 dependents).
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2021
Up next
Before you depend on itsyn crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?