Skip to content

Commit d056f59

Browse files
committed
corrected Cell<T> module level doc
replaced `&mut T` with `&T` to finally state "a &T to the inner value can never be obtained"
1 parent 7e4b8d7 commit d056f59

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/core/src/cell.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
//!
2828
//! ## `Cell<T>`
2929
//!
30-
//! [`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
32-
//! 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
30+
//! [`Cell<T>`] implements interior mutability by moving values in and out of the cell. That is, a
31+
//! `&T` to the inner value can never be obtained, and the value itself cannot be directly
32+
//! obtained without replacing it with something else. This type provides the following
3433
//! methods:
3534
//!
3635
//! - For types that implement [`Copy`], the [`get`](Cell::get) method retrieves the current

0 commit comments

Comments
 (0)