Skip to content

Refactor contracts attribute expansion as AST macro #139304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xizheyin opened this issue Apr 3, 2025 · 0 comments
Open

Refactor contracts attribute expansion as AST macro #139304

xizheyin opened this issue Apr 3, 2025 · 0 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. F-contracts `#![feature(contracts)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@xizheyin
Copy link
Contributor

xizheyin commented Apr 3, 2025

Currently it is using token streams to extend macros, which causes some problems, as discussed in #137129 and #138852. Maybe we should refactor it to AST macros, which can do more accurate analysis.

cc @Noratrieb

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 3, 2025
@Noratrieb Noratrieb added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. F-contracts `#![feature(contracts)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. F-contracts `#![feature(contracts)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants