mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 11:17:26 +03:00
Fix typo “a Rc” → “an Rc”
This commit is contained in:
@@ -1146,7 +1146,7 @@ unsafe fn to_handle_mut(x: *const Self) -> Self::HandleMut {
|
||||
/// 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 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
#[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 @@ fn from(s: &CStr) -> 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 @@ fn from(s: &OsStr) -> 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();
|
||||
|
||||
Reference in New Issue
Block a user