]> git.lizzy.rs Git - rust.git/commitdiff
fix typos
authorPointerbender <81013316+Pointerbender@users.noreply.github.com>
Mon, 24 Oct 2022 02:27:37 +0000 (04:27 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2022 02:27:37 +0000 (04:27 +0200)
Co-authored-by: Ralf Jung <post@ralfj.de>
library/core/src/cell.rs

index 12c6f21172596ad823611e9efe2e5343b57eea4f..fe5dd7be8f6b46c7b74e7ff5f5924751093b2034 100644 (file)
@@ -1827,8 +1827,8 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 /// order to avoid its interior mutability property from spreading from `T` into the `Outer` type,
 /// thus this can cause distortions in the type size in these cases.
 ///
-/// Note that it is still only valid to obtain a `*mut T` pointer to the contents of a
-/// _shared_ `UnsafeCell<T>` through [`.get()`]  or [`.raw_get()`]. A `&mut T` reference
+/// Note that the only valid way to obtain a `*mut T` pointer to the contents of a
+/// _shared_ `UnsafeCell<T>` is through [`.get()`]  or [`.raw_get()`]. A `&mut T` reference
 /// can be obtained by either dereferencing this pointer or by calling [`.get_mut()`]
 /// on an _exclusive_ `UnsafeCell<T>`. Even though `T` and `UnsafeCell<T>` have the
 /// same memory layout, the following is not allowed and undefined behavior: