diff options
| author | bors <bors@rust-lang.org> | 2015-04-08 22:08:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-08 22:08:31 +0000 |
| commit | 6436e348e97a09c2155d0dcd710416e6e0d84371 (patch) | |
| tree | 592eb6fa4567c7b29cd90c17c370d0fa0f692cf7 /src/libsyntax | |
| parent | ff804778c8d69d7835cf7076886ac5dac9a39659 (diff) | |
| parent | a329a61b9bf01bfc3f9f7316bb800b2bc8b76382 (diff) | |
| download | rust-6436e348e97a09c2155d0dcd710416e6e0d84371.tar.gz rust-6436e348e97a09c2155d0dcd710416e6e0d84371.zip | |
Auto merge of #24144 - richo:ptr-formatter, r=alexcrichton
~~I believe this should fix the issue. Opening a PR to ensure noone duplicates effort, I'm running check now.~~ Closes #24091
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ptr.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs index 7e0bcd3e1dc..5032cd57eeb 100644 --- a/src/libsyntax/ptr.rs +++ b/src/libsyntax/ptr.rs @@ -111,6 +111,13 @@ impl<T: Display> Display for P<T> { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl<T> fmt::Pointer for P<T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Pointer::fmt(&self.ptr, f) + } +} + impl<T: Hash> Hash for P<T> { fn hash<H: Hasher>(&self, state: &mut H) { (**self).hash(state); |
