Skip to content

Tracking Issue for proc_macro_back_compat #83125

Open
@Aaron1011

Description

What is this issue?

If you're a crate author who's been linked here, your crate (indirectly) depends on a version of a procedural macro crate that will stop compiling in the future. All affected crates have updated versions published, so you should update to the latest version of the crate mentioned by the compiler warning you saw.

Background

In the past, the Rust compiler has had several bugs in the way that it passes a TokenStream to procedural macros ('proc-macro's). Fixing these bugs resulted in changes the input TokenStream, which some proc-macros were not prepared to handle.

To avoid breaking large portions of the ecosystem, several hardcoded hacks were added to the compiler. When specific macros from certain crates (e.g. time-macros-impl) are invoked, we invoke the macro with a modified TokenStream (what would have been used before the bugfix), which keeps the project compiling.

However, hard-coding specific crate and macro names in the compiler is a huge hack, which we'd like to remove as soon as possible. This issue tracks our progress towards removing all of these hacks.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

TODO

Unresolved Questions

Implementation history

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-proc-macro-back-compatArea: Backwards compatibility hacks for proc macrosA-proc-macrosArea: Procedural macrosC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions