-
Notifications
You must be signed in to change notification settings - Fork 158
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
Enable the missing_inline_in_public_items clippy lint. #175
Enable the missing_inline_in_public_items clippy lint. #175
Conversation
r? @thejpster (rust_highfive has picked a reviewer for you, use r? to override) |
Could we add a comment that explains under which circumstances it's appropriate to use the |
Done! |
This sounds like a bug in the lint – it's not really appropriate to warn about code the user doesn't control. I filed rust-lang/rust-clippy#4861 to track this. |
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.
Changes look good to me, thanks!
We should probably file an issue about the #[derive(Debug)]
issue so we don't forget to remove all those #[allow]
s once rust-lang/rust-clippy#4861 is fixed.
bors r=jonas-schievink |
175: Enable the missing_inline_in_public_items clippy lint. r=jonas-schievink a=m-ou-se This adds `#![deny(clippy::missing_inline_in_public_items)]` to make sure all functions in this crate are marked `#[inline]`, unless they are explicitly marked with `#[allow(clippy::missing_inline_in_public_items)]`. Only three functions in this crate are not `#[inline]`: - `write_words` - `write_all` - `write_aligned` Additionally, the derived `Debug` impl's also have a non-inline implementations. This unfortunately means that the allow attribute also needs to added to any types deriving `Debug`. See also #171 and #174 (comment). Co-authored-by: Mara Bos <[email protected]>
Build succeeded |
This adds
#![deny(clippy::missing_inline_in_public_items)]
to make sure all functions in this crate are marked#[inline]
, unless they are explicitly marked with#[allow(clippy::missing_inline_in_public_items)]
.Only three functions in this crate are not
#[inline]
:write_words
write_all
write_aligned
Additionally, the derived
Debug
impl's also have a non-inline implementations.This unfortunately means that the allow attribute also needs to added to any types deriving
Debug
.See also #171 and #174 (comment).