-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow using clippy::msrv
as an outer attribute
#9860
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
Conversation
r? @Jarcho (rust-highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #9855) made this pull request unmergeable. Please resolve the merge conflicts. |
Why was this limited to inner attributes in the first place? |
I missed it the first time I looked through #6201 but just found #6201 (comment) I think the reasoning applied to an earlier version of the PR, but it ended up using |
574997d
to
bac2f62
Compare
Just want to make sure my interpretation is correct. This looks like when an msrv attribute is seen, it sets the msrv until the next msrv attribute, totally ignoring the scope of the attribute. This would make something like: #[clippy::msrv = "1.28"]
fn foo() {}
fn bar() {} apply the msrv to both I think this should be done, but only if it's going to be scoped correctly. |
Yeah that's #6920, it being used on stable is a good point. I'll get that fixed up first |
I made the decision to limit this to inner attributes, because I didn't really see a use case where it would make sense to apply this to items/expressions/... and because the implementation of only inner attributes was simpler to do. Together with the |
It can make sense when combined with any In the case of |
Opened #9924 Didn't know about that feature, hopefully that gets to stable at some point Picking it up automatically could be good, I would guess a cfg doesn't get passed to |
As with all |
☔ The latest upstream changes (presumably #9924) made this pull request unmergeable. Please resolve the merge conflicts. |
bac2f62
to
2e3d021
Compare
☔ The latest upstream changes (presumably #9945) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Github seems to be only sending me about half the email notifications right now, so you might need to approve yourself after rebasing
2e3d021
to
461e219
Compare
Thanks! Hopefully they fix that 👀 @bors r=Jarcho |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: Allow specifying
#[clippy::msrv]
as an outer attributeProbably not too useful to clippy users, but it makes the MSRV tests slightly cleaner