diff options
| author | joboet <jonas.boettiger@icloud.com> | 2023-03-28 13:55:24 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2023-03-30 14:49:43 +0200 |
| commit | af080bf04be2a82273c646d807d8411518089199 (patch) | |
| tree | 2d24bf967b9eef5d723c6c52559e7c0a3ab956e1 | |
| parent | 97d49fcf60e0da214d8e08cb914821400d421caf (diff) | |
| download | rust-af080bf04be2a82273c646d807d8411518089199.tar.gz rust-af080bf04be2a82273c646d807d8411518089199.zip | |
fix typo and adjust comment
Co-authored-by: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | library/core/src/cell/lazy.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index aff3388529a..44adcfa1a94 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -86,8 +86,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> { // SAFETY: // This invalidates any mutable references to the data. The resulting // reference lives either until the end of the borrow of `this` (in the - // initialized case) or is invalidates in `really_init` (in the - // uninitialized case). + // initialized case) or is invalidated in `really_init` (in the + // uninitialized case; `really_init` will create and return a fresh reference). let state = unsafe { &*this.state.get() }; match state { State::Init(data) => data, |
