Improve documentation of std::ptr::NonNull #48929
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-ffi
Area: Foreign Function Interface (FFI)
A-raw-pointers
Area: raw pointers, MaybeUninit, NonNull
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
P-medium
Medium priority
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
This type used to be experimental and internal (when it was called
Shared
), now that it is finally being stablized (see #27730, #47631), people are complaining that the current document texts are not easy to understand.Current text
*mut T but non-zero and covariant.
talks about the covariance, which is not mentioned elsewhere in thelibstd
docs and the Rust books. (I know it's mentioned in Nomicon but beginners seldom have read it.)I suggest the docs be either supplemented with concrete explanations or reworked upon.
The text was updated successfully, but these errors were encountered: