Skip to content

Commit 9091584

Browse files
committed
some grammar corrections
1 parent 397ce8a commit 9091584

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/libcore/cell.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@
1313
//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
1414
//! have one of the following:
1515
//!
16-
//! - Having several immutable references (`&T`) to the object (also know as Aliasing).
17-
//! - Having one mutable reference (`&mut T`) to the object (also know as Mutability).
16+
//! - Having several immutable references (`&T`) to the object (also known as **aliasing**).
17+
//! - Having one mutable reference (`&mut T`) to the object (also known as **mutability**).
1818
//!
1919
//! This is enforced by the Rust compiler. However, there are situations where this rule is not
2020
//! flexible enough. Sometimes it is required to have multiple references to an object and yet
2121
//! mutate it.
2222
//!
23-
//! Shareable mutable containers exist to permit mutability in the presence of aliasing in a
24-
//! controlled manner. Both `Cell<T>` and `RefCell<T>` allows to do this in a single threaded
23+
//! Shareable mutable containers exist to permit mutability in a controlled manner, even in the
24+
//! presence of aliasing. Both `Cell<T>` and `RefCell<T>` allows to do this in a single threaded
2525
//! way. However, neither `Cell<T>` nor `RefCell<T>` are thread safe (they do not implement
26-
//! `Sync`), if you need to do Aliasing and Mutation between multiple threads is possible to use
27-
//! [`Mutex`](../../std/sync/struct.Mutex.html), [`RwLock`](../../std/sync/struct.RwLock.html) or
26+
//! `Sync`). If you need to do aliasing and mutation between multiple threads it is possible to
27+
//! use [`Mutex`](../../std/sync/struct.Mutex.html),
28+
//! [`RwLock`](../../std/sync/struct.RwLock.html) or
2829
//! [`atomic`](../../core/sync/atomic/index.html) types.
2930
//!
3031
//! Values of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e.

0 commit comments

Comments
 (0)