mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Relax Debug constraints when debugging {HashMap,BTreeMap}::{Keys,Values}.
Fixed #41924.
This commit is contained in:
parent
2ea1d2d007
commit
545bfcd864
@ -334,7 +334,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
|
||||
}
|
||||
|
||||
#[stable(feature = "collection_debug", since = "1.17.0")]
|
||||
impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> {
|
||||
impl<'a, K: 'a + fmt::Debug, V: 'a> fmt::Debug for Keys<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list().entries(self.clone()).finish()
|
||||
}
|
||||
@ -353,7 +353,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
|
||||
}
|
||||
|
||||
#[stable(feature = "collection_debug", since = "1.17.0")]
|
||||
impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> {
|
||||
impl<'a, K: 'a, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list().entries(self.clone()).finish()
|
||||
}
|
||||
|
@ -1407,7 +1407,7 @@ impl<'a, K, V> Clone for Keys<'a, K, V> {
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: Debug, V: Debug> fmt::Debug for Keys<'a, K, V> {
|
||||
impl<'a, K: Debug, V> fmt::Debug for Keys<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
.entries(self.clone())
|
||||
@ -1436,7 +1436,7 @@ impl<'a, K, V> Clone for Values<'a, K, V> {
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: Debug, V: Debug> fmt::Debug for Values<'a, K, V> {
|
||||
impl<'a, K, V: Debug> fmt::Debug for Values<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
.entries(self.clone())
|
||||
|
Loading…
Reference in New Issue
Block a user