diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 2 | ||||
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 8 | ||||
| -rw-r--r-- | src/libstd/ffi/os_str.rs | 8 | ||||
| -rw-r--r-- | src/libstd/path.rs | 8 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 2 |
5 files changed, 26 insertions, 2 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index c0e1e2533a0..9066c0b7694 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -541,7 +541,7 @@ impl Error for JoinPathsError { /// ``` #[rustc_deprecated(since = "1.29.0", reason = "This function's behavior is unexpected and probably not what you want. \ - Consider using the home_dir function from crates.io/crates/dirs instead.")] + Consider using the home_dir function from https://crates.io/crates/dirs instead.")] #[stable(feature = "env", since = "1.0.0")] pub fn home_dir() -> Option<PathBuf> { os_imp::home_dir() diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 6513d11dd51..b816f4b7850 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -706,6 +706,14 @@ impl From<Box<CStr>> for CString { } } +#[stable(feature = "more_box_slice_clone", since = "1.29.0")] +impl Clone for Box<CStr> { + #[inline] + fn clone(&self) -> Self { + (**self).into() + } +} + #[stable(feature = "box_from_c_string", since = "1.20.0")] impl From<CString> for Box<CStr> { #[inline] diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 4ada6a77a8e..b1c6e7af693 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -642,6 +642,14 @@ impl From<OsString> for Box<OsStr> { } } +#[stable(feature = "more_box_slice_clone", since = "1.29.0")] +impl Clone for Box<OsStr> { + #[inline] + fn clone(&self) -> Self { + self.to_os_string().into_boxed_os_str() + } +} + #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From<OsString> for Arc<OsStr> { #[inline] 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 { diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 2dd3aebe610..cbda5afadcd 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -689,7 +689,7 @@ impl<T> UnsafeFlavor<T> for Receiver<T> { /// only one [`Receiver`] is supported. /// /// If the [`Receiver`] is disconnected while trying to [`send`] with the -/// [`Sender`], the [`send`] method will return a [`SendError`]. Similarly, If the +/// [`Sender`], the [`send`] method will return a [`SendError`]. Similarly, if the /// [`Sender`] is disconnected while trying to [`recv`], the [`recv`] method will /// return a [`RecvError`]. /// |
