1 | [package] |
2 | name = "proc-macro2" |
3 | version = "1.0.79" |
4 | authors = ["David Tolnay <dtolnay@gmail.com>" , "Alex Crichton <alex@alexcrichton.com>" ] |
5 | autobenches = false |
6 | categories = ["development-tools::procedural-macro-helpers" ] |
7 | description = "A substitute implementation of the compiler's `proc_macro` API to decouple token-based libraries from the procedural macro use case." |
8 | documentation = "https://docs.rs/proc-macro2" |
9 | edition = "2021" |
10 | keywords = ["macros" , "syn" ] |
11 | license = "MIT OR Apache-2.0" |
12 | repository = "https://github.com/dtolnay/proc-macro2" |
13 | rust-version = "1.56" |
14 | |
15 | [package.metadata.docs.rs] |
16 | rustc-args = ["--cfg" , "procmacro2_semver_exempt" ] |
17 | rustdoc-args = ["--cfg" , "procmacro2_semver_exempt" , "--cfg" , "doc_cfg" , "--generate-link-to-definition" ] |
18 | targets = ["x86_64-unknown-linux-gnu" ] |
19 | |
20 | [package.metadata.playground] |
21 | features = ["span-locations" ] |
22 | |
23 | [dependencies] |
24 | unicode-ident = "1.0" |
25 | |
26 | [dev-dependencies] |
27 | flate2 = "1.0" |
28 | quote = { version = "1.0" , default_features = false } |
29 | rayon = "1.0" |
30 | rustversion = "1" |
31 | tar = "0.4" |
32 | |
33 | [features] |
34 | proc-macro = [] |
35 | default = ["proc-macro" ] |
36 | |
37 | # Expose methods Span::start and Span::end which give the line/column location |
38 | # of a token. |
39 | span-locations = [] |
40 | |
41 | # This feature no longer means anything. |
42 | nightly = [] |
43 | |
44 | [lib] |
45 | doc-scrape-examples = false |
46 | |
47 | [workspace] |
48 | members = ["benches/bench-libproc-macro" , "tests/ui" ] |
49 | |
50 | [patch.crates-io] |
51 | # Our doc tests depend on quote which depends on proc-macro2. Without this line, |
52 | # the proc-macro2 dependency of quote would be the released version of |
53 | # proc-macro2. Quote would implement its traits for types from that proc-macro2, |
54 | # meaning impls would be missing when tested against types from the local |
55 | # proc-macro2. |
56 | # |
57 | # GitHub Actions builds that are in progress at the time that you publish may |
58 | # spuriously fail. This is because they'll be building a local proc-macro2 which |
59 | # carries the second-most-recent version number, pulling in quote which resolves |
60 | # to a dependency on the just-published most recent version number. Thus the |
61 | # patch will fail to apply because the version numbers are different. |
62 | proc-macro2 = { path = "." } |
63 | |