Skip to content

Commit ca7297b

Browse files
committed
remove requirement of T: Debug from Weak<T>
1 parent ffba430 commit ca7297b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2393,7 +2393,7 @@ impl<T: ?Sized> Clone for Weak<T> {
23932393
}
23942394

23952395
#[stable(feature = "rc_weak", since = "1.4.0")]
2396-
impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
2396+
impl<T: ?Sized> fmt::Debug for Weak<T> {
23972397
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23982398
write!(f, "(Weak)")
23992399
}

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
303303
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
304304

305305
#[stable(feature = "arc_weak", since = "1.4.0")]
306-
impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
306+
impl<T: ?Sized> fmt::Debug for Weak<T> {
307307
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
308308
write!(f, "(Weak)")
309309
}

0 commit comments

Comments
 (0)