mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Rollup merge of #132914 - rcorre:cell-grammar, r=tgross35
Update grammar in std::cell docs. 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...".
This commit is contained in:
commit
87d5faf5b6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user