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)*))
}
}
fn assert_send<T: Send>() { }
fn assert_sync<T: Sync>() { }
fn assert_clone<T: Clone>() { }
+ fn assert_debug<T: ::std::fmt::Debug>() { }
assert_send::<Map<Any + Send>>();
assert_send::<Map<Any + Send + Sync>>();
assert_sync::<Map<Any + Sync>>();
assert_sync::<Map<Any + Send + Sync>>();
+ assert_debug::<Map<Any>>();
+ assert_debug::<Map<Any + Send>>();
+ assert_debug::<Map<Any + Sync>>();
+ assert_debug::<Map<Any + Send + Sync>>();
assert_send::<Map<CloneAny + Send>>();
assert_send::<Map<CloneAny + Send + Sync>>();
assert_sync::<Map<CloneAny + Sync>>();
assert_clone::<Map<CloneAny + Send + Sync>>();
assert_clone::<Map<CloneAny + Sync>>();
assert_clone::<Map<CloneAny + Send + Sync>>();
+ assert_debug::<Map<CloneAny>>();
+ assert_debug::<Map<CloneAny + Send>>();
+ assert_debug::<Map<CloneAny + Sync>>();
+ assert_debug::<Map<CloneAny + Send + Sync>>();
}
}