Suppress deprecation warning on mem::uninitialized

This commit is contained in:
David Tolnay 2019-07-07 21:19:50 -07:00
parent bc7a85063d
commit ce89adecc1
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -620,6 +620,7 @@ impl Serialize for SystemTime {
#[cfg(feature = "std")]
macro_rules! serialize_display_bounded_length {
($value:expr, $max:expr, $serializer:expr) => {{
#[allow(deprecated)]
let mut buffer: [u8; $max] = unsafe { mem::uninitialized() };
let remaining_len = {
let mut remaining = &mut buffer[..];