Cargo Features

[dependencies]
syn = { version = "2.0.90", default-features = false, features = ["full", "derive", "parsing", "printing", "fold", "clone-impls", "extra-traits", "proc-macro", "test"] }
default = clone-impls, derive, parsing, printing, proc-macro

These default features are set whenever syn is added without default-features = false somewhere in the dependency tree.

full

Affects fold::Fold.fold_arm, fold::Fold.fold_block, fold::Fold.fold_captured_param, fold::Fold.fold_expr_array, fold::Fold.fold_expr_assign, fold::Fold.fold_expr_async, fold::Fold.fold_expr_await, fold::Fold.fold_expr_block, fold::Fold.fold_expr_break, fold::Fold.fold_expr_closure, fold::Fold.fold_expr_const, fold::Fold.fold_expr_continue, fold::Fold.fold_expr_for_loop, fold::Fold.fold_expr_if, fold::Fold.fold_expr_let, visit::Visit.visit_arm, visit::Visit.visit_block, visit::Visit.visit_captured_param, visit::Visit.visit_expr_array, visit::Visit.visit_expr_assign

derive default

Affects fold::Fold.fold_data, fold::Fold.fold_data_enum, fold::Fold.fold_data_struct, fold::Fold.fold_data_union, fold::Fold.fold_derive_input, fold::fold_data, fold::fold_data_enum, fold::fold_data_struct, fold::fold_data_union, fold::fold_derive_input, visit::Visit.visit_data, visit::Visit.visit_data_enum, visit::Visit.visit_data_struct, visit::Visit.visit_data_union, visit::Visit.visit_derive_input, visit::visit_data, visit::visit_data_enum, visit::visit_data_struct, visit::visit_data_union, visit::visit_derive_input

parsing default

Affects syn::buffer, syn::ext, syn::parse, syn::parse2, syn::parse_str, token::Token, syn::spanned, syn::parse, syn::parse_file, syn::meta

printing default

Enables quote

Affects generics::ImplGenerics, generics::TypeGenerics, generics::Turbofish, syn::spanned

visit visit-mut fold
clone-impls default
extra-traits
proc-macro default

Enables proc-macro of proc-macro2 and optional quote

quote:

Disabling the proc-macro feature removes the dynamic library dependency on libproc_macro in the rustc compiler.

Affects export::TokenStream, parse::Parser.parse, syn::parse

test dev

Enables all-features of syn-test-suite