Change the Debug
impl of Any
and UnsafeCell
to use finish_non_exhaustive
This commit is contained in:
parent
1fb3256fcb
commit
fdae75738b
@ -141,7 +141,7 @@ impl<T: 'static + ?Sized> Any for T {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl fmt::Debug for dyn Any {
|
impl fmt::Debug for dyn Any {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.debug_struct("Any").finish()
|
f.debug_struct("Any").finish_non_exhaustive()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,14 +151,14 @@ impl fmt::Debug for dyn Any {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl fmt::Debug for dyn Any + Send {
|
impl fmt::Debug for dyn Any + Send {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.debug_struct("Any").finish()
|
f.debug_struct("Any").finish_non_exhaustive()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "any_send_sync_methods", since = "1.28.0")]
|
#[stable(feature = "any_send_sync_methods", since = "1.28.0")]
|
||||||
impl fmt::Debug for dyn Any + Send + Sync {
|
impl fmt::Debug for dyn Any + Send + Sync {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.debug_struct("Any").finish()
|
f.debug_struct("Any").finish_non_exhaustive()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2270,7 +2270,7 @@ impl<T: ?Sized + Debug> Debug for RefMut<'_, T> {
|
|||||||
#[stable(feature = "core_impl_debug", since = "1.9.0")]
|
#[stable(feature = "core_impl_debug", since = "1.9.0")]
|
||||||
impl<T: ?Sized> Debug for UnsafeCell<T> {
|
impl<T: ?Sized> Debug for UnsafeCell<T> {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||||
f.debug_struct("UnsafeCell").finish()
|
f.debug_struct("UnsafeCell").finish_non_exhaustive()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user