diff options
author | 2019-11-26 14:37:12 +0100 | |
---|---|---|
committer | 2019-11-26 14:37:12 +0100 | |
commit | 3eebbfca17cde38d32fb3529f93ed61ae659ba1e (patch) | |
tree | 996de7759a2cd4fb8ff4170ce099d33886e2e8a6 /src/lib.rs | |
parent | b5c24630bdf5a23008885c4771a2d31060f8c180 (diff) | |
download | cortex-m-3eebbfca17cde38d32fb3529f93ed61ae659ba1e.tar.gz cortex-m-3eebbfca17cde38d32fb3529f93ed61ae659ba1e.tar.zst cortex-m-3eebbfca17cde38d32fb3529f93ed61ae659ba1e.zip |
Add explanation about clippy::missing_inline_in_public_items lint.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -34,6 +34,20 @@ #![no_std] #![allow(clippy::identity_op)] #![allow(clippy::missing_safety_doc)] + +// This makes clippy warn about public functions which are not #[inline]. +// +// Almost all functions in this crate result in trivial or even no assembly. +// These functions should be #[inline]. +// +// If you do add a function that's not supposed to be #[inline], you can add +// #[allow(clippy::missing_inline_in_public_items)] in front of it to add an +// exception to clippy's rules. +// +// This should be done in case of: +// - A function containing non-trivial logic (such as itm::write_all); or +// - A generated #[derive(Debug)] function (in which case the attribute needs +// to be applied to the struct). #![deny(clippy::missing_inline_in_public_items)] extern crate aligned; |