Skip to content

Commit af080bf

Browse files
joboetRalfJung
andcommitted
fix typo and adjust comment
Co-authored-by: Ralf Jung <[email protected]>
1 parent 97d49fc commit af080bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/cell/lazy.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
8686
// SAFETY:
8787
// This invalidates any mutable references to the data. The resulting
8888
// reference lives either until the end of the borrow of `this` (in the
89-
// initialized case) or is invalidates in `really_init` (in the
90-
// uninitialized case).
89+
// initialized case) or is invalidated in `really_init` (in the
90+
// uninitialized case; `really_init` will create and return a fresh reference).
9191
let state = unsafe { &*this.state.get() };
9292
match state {
9393
State::Init(data) => data,

0 commit comments

Comments
 (0)