Skip to content
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

The Procedural Macros docs does not mention how to create an unsafe attribute #1739

Open
ultimaweapon opened this issue Feb 21, 2025 · 1 comment
Labels
A-attributes Area: Attributes Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like.

Comments

@ultimaweapon
Copy link

I'm migrating my code to 2024 edition and one of my proc_macro_attribute generate an unsafe attribute. I do like to make my attribute unsafe but can't find any information how to do this in https://doc.rust-lang.org/reference/procedural-macros.html.

@ehuss
Copy link
Contributor

ehuss commented Feb 21, 2025

That is not possible with a proc-macro. Only the 3 built-in attributes that are currently unsafe can do that.

@ehuss ehuss added Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like. A-attributes Area: Attributes labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like.
Projects
None yet
Development

No branches or pull requests

2 participants