diff options
| author | Alex Burka <durka42@gmail.com> | 2016-10-01 01:50:56 +0000 |
|---|---|---|
| committer | Alex Burka <durka42@gmail.com> | 2016-10-01 01:50:56 +0000 |
| commit | ba1a49337f8408279e6773818ba4b8215762cb31 (patch) | |
| tree | a8f716000387d0991f8880eff7e72acb8bd9d015 /src/libcore | |
| parent | 50932b5f4e3a5f1b6c955100da5b30d77bcd29d3 (diff) | |
impl Debug for raw pointers to unsized data
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/fmt/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index a9f53d3abb8..9aba6703386 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -1566,11 +1566,11 @@ floating! { f64 } // Implementation of Display/Debug for various core types #[stable(feature = "rust1", since = "1.0.0")] -impl<T> Debug for *const T { +impl<T: ?Sized> Debug for *const T { fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) } } #[stable(feature = "rust1", since = "1.0.0")] -impl<T> Debug for *mut T { +impl<T: ?Sized> Debug for *mut T { fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) } } |
