From 8d9df99fbbefd4e394c932309c1453b5a92d93b3 Mon Sep 17 00:00:00 2001 From: Ulysse Carion Date: Sat, 3 Jun 2017 21:30:13 -0700 Subject: [PATCH 1/2] Explicate what "Rc" and "Arc" stand for. --- src/liballoc/arc.rs | 3 ++- src/liballoc/rc.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 5faf4dcccaf91..81e97334e3c93 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -42,7 +42,8 @@ use heap::deallocate; /// necessarily) at _exactly_ `MAX_REFCOUNT + 1` references. const MAX_REFCOUNT: usize = (isize::MAX) as usize; -/// A thread-safe reference-counting pointer. +/// A thread-safe reference-counting pointer. "Arc" stands for "Atomically +/// Reference Counted". /// /// The type `Arc` provides shared ownership of a value of type `T`, /// allocated in the heap. Invoking [`clone`][clone] on `Arc` produces diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 33951b911dd51..d5d003ed5bb24 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -10,7 +10,8 @@ #![allow(deprecated)] -//! Single-threaded reference-counting pointers. +//! Single-threaded reference-counting pointers. "Rc" stands for "Reference +//! Counted". //! //! The type [`Rc`][`Rc`] provides shared ownership of a value of type `T`, //! allocated in the heap. Invoking [`clone`][clone] on [`Rc`] produces a new From 1af0cb165065ebca5296a7b5841ebec9bfb40476 Mon Sep 17 00:00:00 2001 From: Ulysse Carion Date: Mon, 5 Jun 2017 12:07:54 -0700 Subject: [PATCH 2/2] Use single quotes, and doc the Rc struct itself. --- src/liballoc/arc.rs | 4 ++-- src/liballoc/rc.rs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 81e97334e3c93..5ed41f6ffe627 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -42,8 +42,8 @@ use heap::deallocate; /// necessarily) at _exactly_ `MAX_REFCOUNT + 1` references. const MAX_REFCOUNT: usize = (isize::MAX) as usize; -/// A thread-safe reference-counting pointer. "Arc" stands for "Atomically -/// Reference Counted". +/// A thread-safe reference-counting pointer. 'Arc' stands for 'Atomically +/// Reference Counted'. /// /// The type `Arc` provides shared ownership of a value of type `T`, /// allocated in the heap. Invoking [`clone`][clone] on `Arc` produces diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index d5d003ed5bb24..1f3388ad2c28c 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -10,8 +10,8 @@ #![allow(deprecated)] -//! Single-threaded reference-counting pointers. "Rc" stands for "Reference -//! Counted". +//! Single-threaded reference-counting pointers. 'Rc' stands for 'Reference +//! Counted'. //! //! The type [`Rc`][`Rc`] provides shared ownership of a value of type `T`, //! allocated in the heap. Invoking [`clone`][clone] on [`Rc`] produces a new @@ -267,7 +267,8 @@ struct RcBox { value: T, } -/// A single-threaded reference-counting pointer. +/// A single-threaded reference-counting pointer. 'Rc' stands for 'Reference +/// Counted'. /// /// See the [module-level documentation](./index.html) for more details. ///