Skip to content

Commit 9e3c9a6

Browse files
committed
Add T: ?Sized to RwLock*Guards' Debug impls.
1 parent 62fae23 commit 9e3c9a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/sync/rwlock.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ impl<'rwlock, T: ?Sized> RwLockWriteGuard<'rwlock, T> {
532532
}
533533

534534
#[stable(feature = "std_debug", since = "1.16.0")]
535-
impl<T: fmt::Debug> fmt::Debug for RwLockReadGuard<'_, T> {
535+
impl<T: ?Sized + fmt::Debug> fmt::Debug for RwLockReadGuard<'_, T> {
536536
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
537537
(**self).fmt(f)
538538
}
@@ -546,7 +546,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RwLockReadGuard<'_, T> {
546546
}
547547

548548
#[stable(feature = "std_debug", since = "1.16.0")]
549-
impl<T: fmt::Debug> fmt::Debug for RwLockWriteGuard<'_, T> {
549+
impl<T: ?Sized + fmt::Debug> fmt::Debug for RwLockWriteGuard<'_, T> {
550550
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
551551
(**self).fmt(f)
552552
}

0 commit comments

Comments
 (0)