-
Notifications
You must be signed in to change notification settings - Fork 13.3k
suggest adding #[test] on otherwise-dead code that looks like a test? #33166
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
Comments
That's maybe a bit too much? The idea is good but I'm afraid it might overload the output. Let's see what others think about it. |
In general, naming your function with |
I personally think this is better suited as e.g. a clippy lint and doesn't really make sense for a compiler lint as there'd be too many false positives. It's also true that having helper functions inside |
Sounds good
…On Sun, Sep 1, 2019, 7:21 AM Mark Rousskov ***@***.***> wrote:
Closed #33166 <#33166>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33166?email_source=notifications&email_token=AACUR44R4WGYXDCBJRP5ZF3QHPFU5A5CNFSM4CBY3GQ2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTLXZOWY#event-2599393115>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACUR43MHTSZXGVT3WJBFZ3QHPFU5ANCNFSM4CBY3GQQ>
.
|
On this code:
I currently get
What I need here is a
#[test]
before the function of course. Perhaps rustc could suggest this if some of the following hints are seen#[cfg(test)]
tests
test_*
I don't know if making suggestions based on names is considered unhygienic, but this would remove a small speed bump for new users.
The text was updated successfully, but these errors were encountered: