Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,13 @@ impl fmt::Debug for PathBuf {
}
}

#[stable(feature = "display_path", since = "1.27.0")]
impl fmt::Display for PathBuf {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&Display { path: &**self }, formatter)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl ops::Deref for PathBuf {
type Target = Path;
Expand Down Expand Up @@ -2480,6 +2487,13 @@ impl AsRef<OsStr> for Path {
}
}

#[stable(feature = "display_for_path", since = "1.27.0")]
impl fmt::Display for Path {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&Display { path: self }, formatter)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for Path {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down