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