diff --git a/library/core/src/fmt/num_buffer.rs b/library/core/src/fmt/num_buffer.rs index 474a8d20ef6c..055c50833d94 100644 --- a/library/core/src/fmt/num_buffer.rs +++ b/library/core/src/fmt/num_buffer.rs @@ -35,7 +35,6 @@ impl_NumBufferTrait! { /// A buffer wrapper of which the internal size is based on the maximum /// number of digits the associated integer can have. #[unstable(feature = "int_format_into", issue = "138215")] -#[derive(Debug)] pub struct NumBuffer { // FIXME: Once const generics feature is working, use `T::BUF_SIZE` instead of 40. pub(crate) buf: [MaybeUninit; 40], @@ -43,6 +42,13 @@ pub struct NumBuffer { phantom: core::marker::PhantomData, } +#[unstable(feature = "int_format_into", issue = "138215")] +impl core::fmt::Debug for NumBuffer { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct("NumBuffer").finish() + } +} + #[unstable(feature = "int_format_into", issue = "138215")] impl NumBuffer { /// Initializes internal buffer.