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

Allow attributes on statements #12963

Closed
huonw opened this issue Mar 17, 2014 · 6 comments
Closed

Allow attributes on statements #12963

huonw opened this issue Mar 17, 2014 · 6 comments
Labels
A-grammar Area: The grammar of Rust

Comments

@huonw
Copy link
Member

huonw commented Mar 17, 2014

e.g.

#[allow(uppercase_variable)]
let L = [1,2];

#[only_uses(ffi)] // (hypothetical)
unsafe { 
    // ...
}
@thestinger
Copy link
Contributor

Another use case is a clean way of annotating branch metadata on match and if.

@alexcrichton
Copy link
Member

This is a change to the language grammar, and could have significant impact on the AST. This may warrant an RFC rather than an issue.

@flaper87
Copy link
Contributor

There's a PR proposing attributes on match arms (#12812), I agree this change and the PR I mentioned should probably have an RFC (perhaps they could share the RFC).

@huonw
Copy link
Member Author

huonw commented Mar 17, 2014

I'll write an RFC for "allow attributes on more places" (covering this and #12812) at some point in the nearish future. I can't do it right now so if someone feels like doing it: the floor is open.

@japaric
Copy link
Member

japaric commented Nov 2, 2014

@nick29581 This should be moved to rust-lang/rfcs, it needs an RFC like rust-lang/rfcs#49 did.

@rust-highfive
Copy link
Collaborator

This issue has been moved to the RFCs repo: rust-lang/rfcs#427

JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Sep 6, 2022
…rcegen, r=Veykril

clippy: make generated code nice to read

Feel free to close if this is too minor.

(For context, I _have_ read the clippy policy in `dev/style.md`)
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 27, 2024
Don't lint `implicit_return` on proc macros

This pr fixes rust-lang/rust-clippy#12872

changelog: [`implicit_return`]: Don't lint on procedural macros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust
Projects
None yet
Development

No branches or pull requests

6 participants