-
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
Properly handle feature-gated lints #72970
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
Welcome to the Rust contributors 😄
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.
Looks good to me now.
The only thing I'm not sure about is whether we should test this behavior, and if we should, how to do it. The only test that exists for now is the feature gate test for |
Looks like a purely internal refactoring, no special testing should be necessary. r=me after squashing the commits |
Looks good to me too. I don't think further tests are needed. One thing is that it'd be nice to document this but I guess we don't have coverage of creating lints in the rustc-dev-guide that I can see so I guess it's fine for now. |
- lint: add `feature_gate` field, allow specifying it in `declare_lint!` - generalize the lint feature gate check - librustdoc: generalize whitelisting of feature-gated lints
d4e1acf
to
e7e6bc1
Compare
@petrochenkov I squashed the commits as requested
Perhaps my next contribution could be adding a new lint, and in the process I could add that coverage to the dev guide. |
Thanks! |
📌 Commit e7e6bc1 has been approved by |
… r=petrochenkov Properly handle feature-gated lints Closes rust-lang#72694
… r=petrochenkov Properly handle feature-gated lints Closes rust-lang#72694
Rollup of 5 pull requests Successful merges: - rust-lang#72764 (Be more careful around ty::Error in generators) - rust-lang#72908 (rename FalseEdges -> FalseEdge) - rust-lang#72970 (Properly handle feature-gated lints) - rust-lang#72998 (Mention that some atomic operations may not be available on some platforms) - rust-lang#73063 (Elide type on liballoc vec) Failed merges: r? @ghost
Closes #72694