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