Skip to content

Commit

Permalink
Rollup merge of rust-lang#135762 - TomFryersMidsummer:patch-1, r=joboet
Browse files Browse the repository at this point in the history
Correct counting to four in cell module docs

It could also be argued that `OnceCell<T>` and `LazyCell<T>` don't really provide safe interior mutability in different ways. But it's a vague enough claim that I'm not sure it's worth being pedantic about.
  • Loading branch information
jieyouxu authored Jan 20, 2025
2 parents 3e26673 + 8ba0d2d commit ecfb557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//! (mutable via `&T`), in contrast with typical Rust types that exhibit 'inherited mutability'
//! (mutable only via `&mut T`).
//!
//! Cell types come in three flavors: `Cell<T>`, `RefCell<T>`, and `OnceCell<T>`. Each provides
//! a different way of providing safe interior mutability.
//! Cell types come in four flavors: `Cell<T>`, `RefCell<T>`, `OnceCell<T>`, and `LazyCell<T>`.
//! Each provides a different way of providing safe interior mutability.
//!
//! ## `Cell<T>`
//!
Expand Down

0 comments on commit ecfb557

Please sign in to comment.