prevent inlining of prune on explicit_clear nightly builds

ffi
Avril 4 years ago
parent 1c61cee7ae
commit 1621ca45b6
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -118,6 +118,7 @@ where W: Write
/// Clear the internal buffer while keeping it allocated for further use. /// Clear the internal buffer while keeping it allocated for further use.
/// ///
/// This does not affect operations at all, all it does is 0 out the left-over temporary buffer from the last operation(s). /// This does not affect operations at all, all it does is 0 out the left-over temporary buffer from the last operation(s).
#[cfg_attr(all(nightly, feature="explicit_clear"), inline(never))] // We don't want this asm! being inlined and preventing other optimisations on caller functions.
pub fn prune(&mut self) pub fn prune(&mut self)
{ {
#[cfg(feature="explicit_clear")] #[cfg(feature="explicit_clear")]

Loading…
Cancel
Save