-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add lint warning for inner function marked as #[test]
#51450
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
19ddf80
to
7d3a55a
Compare
This comment has been minimized.
This comment has been minimized.
I'm in favor of this change; but it is my understanding that adding a new lint requires an RFC per notes in https://github.com/rust-lang/rfcs/blob/master/lang_changes.md (which is either outdated and needs to be changed, or is accurate..). |
@Centril in that case I'll create an RFC. This felt small enough as it's warning about already existing behavior, but I can see why we wouldn't want to make exceptions. |
@estebank yeah I agree that it seems like a small, good and uncontroversial change :) It might be a good idea to document what lints need RFCs and which don't. |
I don't think it needs an RFC. This seems like a bug-fix to me. Perhaps an FCP is sufficient? |
#[test]
|
☔ The latest upstream changes (presumably #51382) made this pull request unmergeable. Please resolve the merge conflicts. |
This code seems fine. The only thing left is to resolve the name of the lint itself. How about |
This isn't a "method"; it's a function (as I hear the words usually used). |
@zackmdavis I don't disagree. The high-order bit of my suggestion was meant to be the "unnameable" part, not the use of the word "methods." |
Changed lint name. |
(RFC 344 seems to suggest the plural: unnameable-test-functions?)
|
Ping. Anything left for me to do? |
Ping from triage @pnkfelix! This PR needs your review. |
☔ The latest upstream changes (presumably #51678) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #51149) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping. |
Ping from triage, @pnkfelix / @rust-lang/compiler: This PR requires your review! |
📌 Commit 51a0425 has been approved by |
Add lint warning for inner function marked as `#[test]` Fix #36629.
☀️ Test successful - status-appveyor, status-travis |
Fix #36629.