NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #10 most downloaded on crates.io
A substitute implementation of the compiler's `proc_macro` API to decouple token-based libraries from the procedural macro use case.
Latest stable
1.0.107
Last release 4 months ago
19 Jul 2026
Release timing varies
gaps range from 8 days to 6 months
Most releases are documented
notes for 53 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
9 years old
163 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Documentation improvements
Optimize Span::byte_range
Span::byte_range (#530)Make std dependencies more easily discoverable in source code
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add Rust 1.92.0's TokenStream Extend impls ( #527 , rust-lang/rust#145722 )
Add semver-exempt Literal methods str_value , cstr_value , byte_str_value
Literal methods str_value, cstr_value, byte_str_value (#525)Fix interaction of Display impls for TokenStream and Ident with formatting specifiers for padding, alignment, width ( #523 , #524 )
Optimize Span location accessors
Stabilize Span methods on Rust 1.88+: start , end , line , column , file , local_file ( #517 , #518 )
Prevent Span's unstable API becoming unavailable from a future new compiler lint
Disallow prefixed identifier as name of lifetime: 'prefix#lifetime ( #514 , rust-lang/rust#126452 )
'prefix#lifetime (#514, rust-lang/rust#126452)Allow build-script cleanup failure with NFSv3 output directory to be non-fatal (#505, #512, thanks @davvid)
Simplify how rustdoc flags are decided during docs.rs builds
Update semver-exempt API under RUSTFLAGS=--cfg=procmacro2_semver_exempt to that of nightly-2025-04-16
RUSTFLAGS=--cfg=procmacro2_semver_exempt to that of nightly-2025-04-16 (#497)Nothing published for this version
Optimize TokenStream's Drop (#489, #490, thanks @WalkerKnapp)
Improve compiler/fallback mismatch panic message
Fix panic _"compiler/fallback mismatch 949"_ when using TokenStream::from_str from inside a proc macro to parse a string containing doc comment
Improve error recovery in TokenStream's and Literal's FromStr implementations to work around https://github.com/rust-lang/rust/issues/58736 such that
Ensure OUT_DIR is left with deterministic contents after build script execution
Return accurate line and column from Span::start and Span::end inside proc macros on nightly
Span::start and Span::end inside proc macros on nightly (#472)Check valid punctuation character in Punct::new
Punct::new (#470)Nothing published for this version
Mark some tests as only for 64-bit targets
Documentation improvements (#455, thanks @CensoredUsername)
Optimize the representation of Ident
Ident (#462)Resolve unexpected_cfgs warning
Nothing published for this version
Add Literal::byte_character constructor
Literal::byte_character constructor (#449)Literal::c_string constructor #450)Nothing published for this version
- Expose Span::byte_range
Add a function to reset thread-local span data (#438, thanks @buchgr)
Work around dead_code warning false positive
dead_code warning false positive (#435)Improve error messages related to proc_macro::LexError
Work around improperly cached build script result by sccache
Nothing published for this version
Improve build script to be robust to proc_macro::Span unstable API changes
Turn on deny(unsafe_op_in_unsafe_fn) lint
deny(unsafe_op_in_unsafe_fn) lintAdd #\[track_caller\] on Ident::new so that panics on invalid input are attributed to the caller
Ident::new so that panics on invalid input are attributed to the caller (#423)Fix Span::source_text() bug causing panics or incorrect source text
Fix panic in Span::source_text() when source contains multibyte characters
Special handling for the (/*ERROR*/) placeholder that rustc uses for macros that fail to expand
(/*ERROR*/) placeholder that rustc uses for macros that fail to expand (#405)Raise required compiler from Rust 1.31 to 1.56
Nothing published for this version
Fix parsing of bare \r in between tokens
\r in between tokens (#399)Parse c"…" c-string literals (tracking issue: https://github.com/rust-lang/rust/issues/105723)
c"…" c-string literals (tracking issue: https://github.com/rust-lang/rust/issues/105723)Nothing published for this version
Stricter parsing of whitespace in cooked string literals and between tokens (#392, #393)
Eliminate uses of unstable proc_macro::Span::before/after
Enable proc_macro support on wasm targets
Make rustc version detection more robust by compiling against modernest stable features
Disable nightly-only start()/end() implementation on Span while the upstream API is iterated on (#383, https://github.com/rust-lang/rust/pull/111571)
start()/end() implementation on Span while the upstream API is iterated on (#383, https://github.com/rust-lang/rust/pull/111571)Circumvent clippy::octal_escapes lint inside generated string and byte-string literals (#363, #380)
Set a meaningful Span for literals produced via the FromStr impl of Literal
Span for literals produced via the FromStr impl of Literal (#378)Literal::subspan in non-macro contexts when "span-locations" feature is enabled (#379)Performance improvement to "span-locations" feature
Add support for Rust 1.66's source_text() method
source_text() method (#350)- Add `Group::delim_span`
Group::delim_span (#366)Implement rustc's limit on the number of # used for delimiting a raw string literal: 255
# used for delimiting a raw string literal: 255 (#364)Implement Hash for proc_macro2::LineColumn
Opt out of -Zrustdoc-scrape-examples on docs.rs for now
-Zrustdoc-scrape-examples on docs.rs for nowNothing published for this version
One column per quarter.