diff options
| author | Violet <violet@geeklint.com> | 2021-10-25 21:35:45 -0400 |
|---|---|---|
| committer | Violet <violet@geeklint.com> | 2021-10-25 21:35:45 -0400 |
| commit | ca7297b86673cf06c7089a962b763abb246ec4d5 (patch) | |
| tree | 723efb7808c76999848dfd4202203a2cc9432cef | |
| parent | ffba4309241a7a21df4ec7b16f1357cbcd327d6e (diff) | |
| download | rust-ca7297b86673cf06c7089a962b763abb246ec4d5.tar.gz rust-ca7297b86673cf06c7089a962b763abb246ec4d5.zip | |
remove requirement of T: Debug from Weak<T>
| -rw-r--r-- | library/alloc/src/rc.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 493cf3117ed..45333f38d8f 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2393,7 +2393,7 @@ impl<T: ?Sized> Clone for Weak<T> { } #[stable(feature = "rc_weak", since = "1.4.0")] -impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> { +impl<T: ?Sized> fmt::Debug for Weak<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "(Weak)") } diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index b75e9a2f3c7..a3422fb93c8 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -303,7 +303,7 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {} impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {} #[stable(feature = "arc_weak", since = "1.4.0")] -impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> { +impl<T: ?Sized> fmt::Debug for Weak<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "(Weak)") } |
