-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lint wrong usage of known attributes - spotlight: no_std #3782
Comments
This is surprising, the compiler errors (or used to error?) for this kind
of mistake in many cases.
But yeah we should def catch any cases like this in clippy, in case we
don't just make this a part of the compiler.
…On Mon, Feb 18, 2019, 7:03 PM Hero Bird ***@***.*** wrote:
When compiling a no_std crate it already happened multiple times that I
forgot the ! after the # in #![no_std] (or similar) attribute specifiers
causing compilation troubles because I accidentally pulled std due to this.
The compiler doesn't warn for misusage of known attributes like no_std
and I am not sure if it should. But it would be awesome to have a clippy
lint for this situation! Would have saved me hours of debugging already -
*ashamed*.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3782>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABivSB9v0fj5Do_SsBYKDbiXisyreZKJks5vOquMgaJpZM4bA4C0>
.
|
A similar lint is |
This should be an error from the compiler, yes. |
seems like it's handled by the So... closing it as its already done by the compiler. |
When compiling a
no_std
crate it already happened multiple times that I forgot the!
after the#
in#![no_std]
(or similar) attribute specifiers making it a useless#[no_std]
causing compilation troubles because I accidentally pulled std due to this. The compiler doesn't warn for misusage of known attributes likeno_std
and I am not sure if it should. But it would be awesome to have aclippy
lint for this situation! Would have saved me hours of debugging already - ashamed.The text was updated successfully, but these errors were encountered: