mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-23 16:00:10 +00:00
2e0229cd93
This commit moves all #[derive] annotations behind Cargo feature gates to add the ability to strip them all out entirely. The `Clone` and `Copy` impls continue to be enabled by default as they tend to be mega useful but other equality/hash/debug impls are all default behind the `extra-impls` gate. This commit, on my computer, has the following timings: | features | before | after |-------------------------------|---------|------ | default | 3.67 | 2.96 | *none* | 1.78 | 0.49 | {printing, parsing} | 3.71 | 2.57 | default + {full} | 8.50 | 6.31 | {full} | 3.53 | 0.70 | {full, printing, parsing} | 8.10 | 5.29 Closes #143
33 lines
946 B
TOML
33 lines
946 B
TOML
[package]
|
|
name = "syn"
|
|
version = "0.11.11" # don't forget to update version in readme for breaking changes
|
|
authors = ["David Tolnay <dtolnay@gmail.com>"]
|
|
license = "MIT/Apache-2.0"
|
|
description = "Nom parser for Rust source code"
|
|
repository = "https://github.com/dtolnay/syn"
|
|
documentation = "https://dtolnay.github.io/syn/syn/"
|
|
categories = ["development-tools::procedural-macro-helpers"]
|
|
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
|
|
|
|
[features]
|
|
default = ["parsing", "printing", "clone-impls"]
|
|
aster = []
|
|
full = []
|
|
parsing = ["unicode-xid", "synom"]
|
|
printing = ["quote"]
|
|
visit = []
|
|
fold = []
|
|
clone-impls = []
|
|
extra-traits = []
|
|
|
|
[dependencies]
|
|
quote = { version = "0.3.7", optional = true }
|
|
unicode-xid = { version = "0.0.4", optional = true }
|
|
synom = { version = "0.11", path = "synom", optional = true }
|
|
|
|
[dev-dependencies]
|
|
syntex_pos = "0.58"
|
|
syntex_syntax = "0.58"
|
|
tempdir = "0.3.5"
|
|
walkdir = "1.0.1"
|