Auto merge of #31427 - reem:more-debug-mutex, r=sfackler
There is no reason to require T: 'static; the bound appears to be a historical artifact.
This commit is contained in:
commit
3ad5bc01ec
@ -311,7 +311,7 @@ impl<T: ?Sized> Drop for Mutex<T> {
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized + fmt::Debug + 'static> fmt::Debug for Mutex<T> {
|
||||
impl<T: ?Sized + fmt::Debug> fmt::Debug for Mutex<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self.try_lock() {
|
||||
Ok(guard) => write!(f, "Mutex {{ data: {:?} }}", &*guard),
|
||||
|
Loading…
Reference in New Issue
Block a user