Skip to content

Commit 0439b89

Browse files
authored
Update cell.rs, correct module level doc
This change corrects the Cell<T> section by replacing `&mut` with `&` so the statement reads "an &T to the inner value can never be obtained". It also emphasizes that a single &mut T to the inner value can be obtained (e.g. via method core::cell::Cell::get_mut).
1 parent 7e4b8d7 commit 0439b89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
//! ## `Cell<T>`
2929
//!
3030
//! [`Cell<T>`] implements interior mutability by moving values in and out of the cell. That is, an
31-
//! `&mut T` to the inner value can never be obtained, and the value itself cannot be directly
31+
//! `& T` to the inner value can never be obtained, and the value itself cannot be directly
3232
//! obtained without replacing it with something else. Both of these rules ensure that there is
33-
//! never more than one reference pointing to the inner value. This type provides the following
33+
//! never more than one mutable reference pointing to the inner value. This type provides the following
3434
//! methods:
3535
//!
3636
//! - For types that implement [`Copy`], the [`get`](Cell::get) method retrieves the current

0 commit comments

Comments
 (0)