• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[package]
2name = "proc-macro2"
3version = "1.0.36" # remember to update html_root_url
4authors = ["David Tolnay <dtolnay@gmail.com>", "Alex Crichton <alex@alexcrichton.com>"]
5license = "MIT OR Apache-2.0"
6readme = "README.md"
7keywords = ["macros"]
8repository = "https://github.com/dtolnay/proc-macro2"
9documentation = "https://docs.rs/proc-macro2"
10categories = ["development-tools::procedural-macro-helpers"]
11edition = "2018"
12autobenches = false
13rust-version = "1.31"
14description = """
15A substitute implementation of the compiler's `proc_macro` API to decouple
16token-based libraries from the procedural macro use case.
17"""
18
19[package.metadata.docs.rs]
20rustc-args = ["--cfg", "procmacro2_semver_exempt"]
21rustdoc-args = ["--cfg", "procmacro2_semver_exempt", "--cfg", "doc_cfg"]
22targets = ["x86_64-unknown-linux-gnu"]
23
24[package.metadata.playground]
25features = ["span-locations"]
26
27[dependencies]
28unicode-xid = "0.2"
29
30[dev-dependencies]
31quote = { version = "1.0", default_features = false }
32
33[features]
34proc-macro = []
35default = ["proc-macro"]
36
37# Expose methods Span::start and Span::end which give the line/column location
38# of a token.
39span-locations = []
40
41# This feature no longer means anything.
42nightly = []
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