Skip to content

Commit a3e70c7

Browse files
committed
syntax: impl fmt::Pointer for P<T>
1 parent b36c978 commit a3e70c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libsyntax/ptr.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ impl<T: Display> Display for P<T> {
111111
}
112112
}
113113

114+
#[stable(feature = "rust1", since = "1.0.0")]
115+
impl<T> fmt::Pointer for P<T> {
116+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
117+
fmt::Pointer::fmt(&self.ptr, f)
118+
}
119+
}
120+
114121
impl<T: Hash> Hash for P<T> {
115122
fn hash<H: Hasher>(&self, state: &mut H) {
116123
(**self).hash(state);

0 commit comments

Comments
 (0)