-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 a reason="foo" in lint attributes #9025
Conversation
Also add a lint that asserts that all lint attributes have a reason (allow by default). Closes #3358
r? @brson |
It seems a bit odd to have a Also, would you mind adding some tests for lint attributes? They're easy to become wrong over time. |
@alexcrichton well when it shows "lint level set here", the reason line will be there. |
@alexcrichton is that test sufficient? |
Could you add some controls with scope? Just to make sure that it picks up changes in the lint level accordingly. Something like |
I don't understand what you're asking for. On Fri, Sep 6, 2013 at 2:13 PM, Alex Crichton [email protected]:
|
#[deny(no_lint_reason)];
#[allow(no_lint_reason)]
mod foo {
#[warn(unused_unsafe)];
} should compile or something like that |
#[deny(no_lint_reason, reason="")];
#[allow(no_lint_reason, reason="")]
mod foo {
#[warn(unused_unsafe)];
}
fn main() { } compiles; perhaps this isn't quite the desired functionality though. |
@alexcrichton is this now acceptable? |
The code itself looks fine (a few stray |
I'll add this to the agenda for the next meeting. |
We discussed this at the meeting and agreed the pull request is good, but it's not compelling enough of a feature to include. Sorry! |
unused_async: lint async methods Now lints: ```rust impl Foo { async fn method(&self) -> &'static str { "no await here" } } ``` changelog: [`unused_async`]: lint async methods Fixes rust-lang#9024
No description provided.