• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[package]
2name = "proc-macro2"
3version = "1.0.76"
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"]
17rustdoc-args = ["--cfg", "procmacro2_semver_exempt", "--cfg", "doc_cfg", "--generate-link-to-definition"]
18targets = ["x86_64-unknown-linux-gnu"]
19
20[package.metadata.playground]
21features = ["span-locations"]
22
23[dependencies]
24unicode-ident = "1.0"
25
26[dev-dependencies]
27quote = { version = "1.0", default_features = false }
28rustversion = "1"
29
30[features]
31proc-macro = []
32default = ["proc-macro"]
33
34# Expose methods Span::start and Span::end which give the line/column location
35# of a token.
36span-locations = []
37
38# This feature no longer means anything.
39nightly = []
40
41[lib]
42doc-scrape-examples = false
43
44[workspace]
45members = ["benches/bench-libproc-macro", "tests/ui"]
46
47[patch.crates-io]
48# Our doc tests depend on quote which depends on proc-macro2. Without this line,
49# the proc-macro2 dependency of quote would be the released version of
50# proc-macro2. Quote would implement its traits for types from that proc-macro2,
51# meaning impls would be missing when tested against types from the local
52# proc-macro2.
53#
54# GitHub Actions builds that are in progress at the time that you publish may
55# spuriously fail. This is because they'll be building a local proc-macro2 which
56# carries the second-most-recent version number, pulling in quote which resolves
57# to a dependency on the just-published most recent version number. Thus the
58# patch will fail to apply because the version numbers are different.
59proc-macro2 = { path = "." }
60