diff options
| author | bors <bors@rust-lang.org> | 2018-07-12 12:50:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-12 12:50:13 +0000 |
| commit | 7db82ccd765cbfe55c3d8a2c434bc6f9b986843d (patch) | |
| tree | 41bda55edea65f5ef3f02b198ce2984b97e666e2 /src/libstd/path.rs | |
| parent | d334027c58060449cc45b8e5cc37dd51ca077d30 (diff) | |
| parent | a7c2c68b135b40666bda030315007c29ce197901 (diff) | |
| download | rust-7db82ccd765cbfe55c3d8a2c434bc6f9b986843d.tar.gz rust-7db82ccd765cbfe55c3d8a2c434bc6f9b986843d.zip | |
Auto merge of #52303 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests Successful merges: - #51816 (bootstrap: write texts to a .tmp file first for atomicity) - #51912 (impl Clone for Box<CStr>, Box<OsStr>, Box<Path>) - #52164 (use proper footnote syntax for references) - #52220 (Deny bare trait objects in `src/bootstrap`) - #52276 (rustc: Verify #[proc_macro] is only a word) - #52277 (Uncapitalize "If") - #52287 (Deny bare trait objects in src/librustc_resolve) - #52295 (Deny bare trait objects in src/libsyntax_ext) - #52298 (make reference to dirs crate clickable in terminals) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 3dc1e9c3dad..2d868629278 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1410,6 +1410,14 @@ impl From<PathBuf> for Box<Path> { } } +#[stable(feature = "more_box_slice_clone", since = "1.29.0")] +impl Clone for Box<Path> { + #[inline] + fn clone(&self) -> Self { + self.to_path_buf().into_boxed_path() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for PathBuf { fn from(s: &'a T) -> PathBuf { |
