Correct docs in Arc and Rc.
A number of trait implementations incorrectly claimed to be zero cost.
This commit is contained in:
@@ -1766,7 +1766,8 @@ impl<'a> From<Cow<'a, Path>> for PathBuf {
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<PathBuf> for Arc<Path> {
|
||||
/// Converts a [`PathBuf`] into an [`Arc`] by moving the [`PathBuf`] data into a new [`Arc`] buffer.
|
||||
/// Converts a [`PathBuf`] into an <code>[Arc]<[Path]></code> by moving the [`PathBuf`] data
|
||||
/// into a new [`Arc`] buffer.
|
||||
#[inline]
|
||||
fn from(s: PathBuf) -> Arc<Path> {
|
||||
let arc: Arc<OsStr> = Arc::from(s.into_os_string());
|
||||
@@ -1786,7 +1787,8 @@ impl From<&Path> for Arc<Path> {
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<PathBuf> for Rc<Path> {
|
||||
/// Converts a [`PathBuf`] into an [`Rc`] by moving the [`PathBuf`] data into a new `Rc` buffer.
|
||||
/// Converts a [`PathBuf`] into an <code>[Rc]<[Path]></code> by moving the [`PathBuf`] data into
|
||||
/// a new [`Rc`] buffer.
|
||||
#[inline]
|
||||
fn from(s: PathBuf) -> Rc<Path> {
|
||||
let rc: Rc<OsStr> = Rc::from(s.into_os_string());
|
||||
@@ -1796,7 +1798,7 @@ impl From<PathBuf> for Rc<Path> {
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<&Path> for Rc<Path> {
|
||||
/// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new `Rc` buffer.
|
||||
/// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new [`Rc`] buffer.
|
||||
#[inline]
|
||||
fn from(s: &Path) -> Rc<Path> {
|
||||
let rc: Rc<OsStr> = Rc::from(s.as_os_str());
|
||||
|
||||
Reference in New Issue
Block a user