mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 01:52:51 +00:00
Fix typo “a Rc” → “an Rc”
This commit is contained in:
parent
a49e38e672
commit
04fa1d81dd
@ -1146,7 +1146,7 @@ pub type VecRef<T, U = T> = OwningRef<Vec<T>, U>;
|
||||
/// Typedef of an owning reference that uses a `String` as the owner.
|
||||
pub type StringRef = OwningRef<String, str>;
|
||||
|
||||
/// Typedef of an owning reference that uses a `Rc` as the owner.
|
||||
/// Typedef of an owning reference that uses an `Rc` as the owner.
|
||||
pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
|
||||
/// Typedef of an owning reference that uses an `Arc` as the owner.
|
||||
pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;
|
||||
|
@ -1743,7 +1743,7 @@ impl<T: ?Sized> fmt::Pointer for Rc<T> {
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[stable(feature = "from_for_ptrs", since = "1.6.0")]
|
||||
impl<T> From<T> for Rc<T> {
|
||||
/// Converts a generic type `T` into a `Rc<T>`
|
||||
/// Converts a generic type `T` into an `Rc<T>`
|
||||
///
|
||||
/// The conversion allocates on the heap and moves `t`
|
||||
/// from the stack into it.
|
||||
|
@ -958,7 +958,7 @@ impl From<&CStr> for Arc<CStr> {
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<CString> for Rc<CStr> {
|
||||
/// Converts a [`CString`] into a [`Rc`]`<CStr>` without copying or allocating.
|
||||
/// Converts a [`CString`] into an [`Rc`]`<CStr>` without copying or allocating.
|
||||
#[inline]
|
||||
fn from(s: CString) -> Rc<CStr> {
|
||||
let rc: Rc<[u8]> = Rc::from(s.into_inner());
|
||||
|
@ -916,7 +916,7 @@ impl From<&OsStr> for Arc<OsStr> {
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<OsString> for Rc<OsStr> {
|
||||
/// Converts an [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating.
|
||||
/// Converts an [`OsString`] into an [`Rc`]`<OsStr>` without copying or allocating.
|
||||
#[inline]
|
||||
fn from(s: OsString) -> Rc<OsStr> {
|
||||
let rc = s.inner.into_rc();
|
||||
|
Loading…
Reference in New Issue
Block a user