diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index ed32668456df6..3dcc5cd2b5911 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -1793,7 +1793,7 @@ impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> { #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawEntryBuilderMut<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawEntryBuilder").finish() + f.debug_struct("RawEntryBuilder").finish_non_exhaustive() } } @@ -1813,21 +1813,21 @@ impl Debug for RawOccupiedEntryMut<'_, K, V, S> { f.debug_struct("RawOccupiedEntryMut") .field("key", self.key()) .field("value", self.get()) - .finish() + .finish_non_exhaustive() } } #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawVacantEntryMut<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawVacantEntryMut").finish() + f.debug_struct("RawVacantEntryMut").finish_non_exhaustive() } } #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawEntryBuilder<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawEntryBuilder").finish() + f.debug_struct("RawEntryBuilder").finish_non_exhaustive() } } @@ -1867,7 +1867,10 @@ pub struct OccupiedEntry<'a, K: 'a, V: 'a> { #[stable(feature = "debug_hash_map", since = "1.12.0")] impl Debug for OccupiedEntry<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("OccupiedEntry").field("key", self.key()).field("value", self.get()).finish() + f.debug_struct("OccupiedEntry") + .field("key", self.key()) + .field("value", self.get()) + .finish_non_exhaustive() } } @@ -1903,7 +1906,7 @@ impl Debug for OccupiedError<'_, K, V> { .field("key", self.entry.key()) .field("old_value", self.entry.get()) .field("new_value", &self.value) - .finish() + .finish_non_exhaustive() } } diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index ccbc69a975c32..8da6ced03a8cd 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1154,7 +1154,7 @@ impl fmt::Debug for Metadata { .field("modified", &self.modified()) .field("accessed", &self.accessed()) .field("created", &self.created()) - .finish() + .finish_non_exhaustive() } } diff --git a/library/std/src/io/buffered/linewriter.rs b/library/std/src/io/buffered/linewriter.rs index 502c6e3c6c0b9..d7b620d6f9177 100644 --- a/library/std/src/io/buffered/linewriter.rs +++ b/library/std/src/io/buffered/linewriter.rs @@ -227,6 +227,6 @@ where "buffer", &format_args!("{}/{}", self.inner.buffer().len(), self.inner.capacity()), ) - .finish() + .finish_non_exhaustive() } } diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs index 974851a8bd634..ca86e569bc127 100644 --- a/library/std/src/lazy.rs +++ b/library/std/src/lazy.rs @@ -515,7 +515,7 @@ pub struct SyncLazy T> { #[unstable(feature = "once_cell", issue = "74465")] impl fmt::Debug for SyncLazy { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Lazy").field("cell", &self.cell).field("init", &"..").finish() + f.debug_struct("Lazy").field("cell", &self.cell).finish_non_exhaustive() } } diff --git a/library/std/src/process.rs b/library/std/src/process.rs index f9cfd11e90650..5690de681cab9 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -234,7 +234,7 @@ impl fmt::Debug for Child { .field("stdin", &self.stdin) .field("stdout", &self.stdout) .field("stderr", &self.stderr) - .finish() + .finish_non_exhaustive() } } diff --git a/library/std/src/sync/mpsc/mod.rs b/library/std/src/sync/mpsc/mod.rs index b12e7eeb13814..c8f0a6b99fe6b 100644 --- a/library/std/src/sync/mpsc/mod.rs +++ b/library/std/src/sync/mpsc/mod.rs @@ -864,7 +864,7 @@ impl Drop for Sender { #[stable(feature = "mpsc_debug", since = "1.8.0")] impl fmt::Debug for Sender { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Sender").finish() + f.debug_struct("Sender").finish_non_exhaustive() } } @@ -991,7 +991,7 @@ impl Drop for SyncSender { #[stable(feature = "mpsc_debug", since = "1.8.0")] impl fmt::Debug for SyncSender { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("SyncSender").finish() + f.debug_struct("SyncSender").finish_non_exhaustive() } } @@ -1470,7 +1470,7 @@ impl Drop for Receiver { #[stable(feature = "mpsc_debug", since = "1.8.0")] impl fmt::Debug for Receiver { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Receiver").finish() + f.debug_struct("Receiver").finish_non_exhaustive() } } diff --git a/library/std/src/sys/wasi/fs.rs b/library/std/src/sys/wasi/fs.rs index 1ec3ff6a10f9a..ed0f03e4b710b 100644 --- a/library/std/src/sys/wasi/fs.rs +++ b/library/std/src/sys/wasi/fs.rs @@ -130,7 +130,7 @@ impl FileType { impl fmt::Debug for ReadDir { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ReadDir").finish() + f.debug_struct("ReadDir").finish_non_exhaustive() } } diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 0ef848ff0c4c1..ffdf4be158457 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -1176,7 +1176,10 @@ impl Thread { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Debug for Thread { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Thread").field("id", &self.id()).field("name", &self.name()).finish() + f.debug_struct("Thread") + .field("id", &self.id()) + .field("name", &self.name()) + .finish_non_exhaustive() } }