diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-07 22:54:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-07 22:54:19 -0500 |
| commit | 4cde461bb037d816a2a004c23e6365babb0889e3 (patch) | |
| tree | c2b7ca4df6447f780044828bcb4d89049fd9c86d | |
| parent | c14f87e3b0823407a91a283796bf78ef83d5fe99 (diff) | |
| parent | 108293d4e93e3a9dfe6181f72459cbe32553e25f (diff) | |
| download | rust-4cde461bb037d816a2a004c23e6365babb0889e3.tar.gz rust-4cde461bb037d816a2a004c23e6365babb0889e3.zip | |
Rollup merge of #38764 - Aaronepower:master, r=aturon
Added Default impl to PathBuf
| -rw-r--r-- | src/libstd/path.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index eb0a6cd74d7..07b43cd89ac 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1265,6 +1265,13 @@ impl Borrow<Path> for PathBuf { } } +#[stable(feature = "default_for_pathbuf", since = "1.16.0")] +impl Default for PathBuf { + fn default() -> Self { + PathBuf::new() + } +} + #[stable(feature = "cow_from_path", since = "1.6.0")] impl<'a> From<&'a Path> for Cow<'a, Path> { #[inline] |
