Conditionally include ALIGN_TO

This const is only used under specific features, use `cfg` to
conditionally build it in.

Removes clippy warning.
This commit is contained in:
Tobin Harding 2020-12-22 11:26:43 +11:00
parent f67081a01c
commit 617bff9df3
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ impl AlignedType {
}
}
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
pub(crate) const ALIGN_TO: usize = mem::align_of::<AlignedType>();