]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #30839 - tomaka:debug-phantomdata, r=nikomatsakis
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 13 Jan 2016 22:52:20 +0000 (04:22 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Thu, 14 Jan 2016 05:34:42 +0000 (11:04 +0530)
All the trait implementations of `PhantomData` use `impl<T: ?Sized>` except for `Debug`
https://doc.rust-lang.org/nightly/std/marker/struct.PhantomData.html#implementations

This PR fixes this.

src/libcore/fmt/mod.rs

index 628bf654873c7cfc7e8195fbf9d7146d607ef618..4033fea1f8e5d892bd189b9cd8a8098c297869bd 100644 (file)
@@ -1569,7 +1569,7 @@ fn fmt(&self, f: &mut Formatter) -> Result {
     }
 }
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T> Debug for PhantomData<T> {
+impl<T: ?Sized> Debug for PhantomData<T> {
     fn fmt(&self, f: &mut Formatter) -> Result {
         f.pad("PhantomData")
     }