Skip to content

Commit

Permalink
Update grammar in std::cell docs.
Browse files Browse the repository at this point in the history
Using "having" in both the leading sentence and the bullets is unnecessary.
It makes it read as "it is only possible to have having several immutable...".
  • Loading branch information
rcorre committed Nov 11, 2024
1 parent 4dd2270 commit 2d676d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
//! have one of the following:
//!
//! - Having several immutable references (`&T`) to the object (also known as **aliasing**).
//! - Having one mutable reference (`&mut T`) to the object (also known as **mutability**).
//! - Several immutable references (`&T`) to the object (also known as **aliasing**).
//! - One mutable reference (`&mut T`) to the object (also known as **mutability**).
//!
//! This is enforced by the Rust compiler. However, there are situations where this rule is not
//! flexible enough. Sometimes it is required to have multiple references to an object and yet
Expand Down

0 comments on commit 2d676d4

Please sign in to comment.