From 8ed728babb057c0f736a63a69ba772e45278148f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 30 Apr 2014 20:36:58 -0700 Subject: core: Inherit the any module --- src/libstd/fmt/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libstd/fmt') diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index 53d6f2fc0d2..8c999c2e2e3 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -1242,6 +1242,14 @@ impl Show for *mut T { fn fmt(&self, f: &mut Formatter) -> Result { secret_pointer(self, f) } } +impl Show for Box { + fn fmt(&self, f: &mut Formatter) -> Result { f.pad("Box") } +} + +impl<'a> Show for &'a any::Any { + fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") } +} + impl Show for TypeId { fn fmt(&self, f: &mut Formatter) -> Result { write!(f.buf, "TypeId \\{ {} \\}", self.hash()) -- cgit 1.4.1-3-g733a5