From c5f73ed80c9c37cceaa25ed20c0f88f9d324bd8c Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Sun, 7 Feb 2016 17:57:01 -0500 Subject: Implement fmt::Pointer for pointers to unsized types This allows printing pointers to unsized types with the {:p} formatting directive. The following impls are extended to unsized types: - impl<'a, T: ?Sized> Pointer for &'a T - impl<'a, T: ?Sized> Pointer for &'a mut T - impl Pointer for *const T - impl Pointer for *mut T - impl fmt::Pointer for Box - impl fmt::Pointer for Rc - impl fmt::Pointer for Arc --- src/liballoc/rc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/liballoc/rc.rs') diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 3c4bea95ba1..162312e2457 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -688,7 +688,7 @@ impl fmt::Debug for Rc { } #[stable(feature = "rust1", since = "1.0.0")] -impl fmt::Pointer for Rc { +impl fmt::Pointer for Rc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Pointer::fmt(&*self._ptr, f) } -- cgit 1.4.1-3-g733a5