diff --git a/src/any.rs b/src/any.rs index 45ad5cc..5b5e6e6 100644 --- a/src/any.rs +++ b/src/any.rs @@ -116,15 +116,9 @@ pub trait IntoBox: Any { macro_rules! implement { ($base:ident, $(+ $bounds:ident)*) => { - impl<'a> fmt::Debug for &'a ($base $(+ $bounds)*) { + impl fmt::Debug for $base $(+ $bounds)* { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(stringify!(&($base $(+ $bounds)*))) - } - } - - impl<'a> fmt::Debug for Box<$base $(+ $bounds)*> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(stringify!(Box<$base $(+ $bounds)*>)) + f.pad(stringify!($base $(+ $bounds)*)) } } diff --git a/src/lib.rs b/src/lib.rs index 8e83bab..4bc330f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -427,10 +427,15 @@ mod tests { fn assert_send() { } fn assert_sync() { } fn assert_clone() { } + fn assert_debug() { } assert_send::>(); assert_send::>(); assert_sync::>(); assert_sync::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); assert_send::>(); assert_send::>(); assert_sync::>(); @@ -439,5 +444,9 @@ mod tests { assert_clone::>(); assert_clone::>(); assert_clone::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); } }