diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-08-23 08:44:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-23 08:44:27 -0400 |
| commit | 4d83634faf3f45e0f80e5629917dd03744e9b330 (patch) | |
| tree | 722c700f2e1911e63bbbac27aa205fdc6366fc32 | |
| parent | 99ab3193da1e0cc91e7b7a9a0f3207ab71763299 (diff) | |
| parent | c987f30049c954be378f847c8bef730fdb95cab8 (diff) | |
| download | rust-4d83634faf3f45e0f80e5629917dd03744e9b330.tar.gz rust-4d83634faf3f45e0f80e5629917dd03744e9b330.zip | |
Rollup merge of #44039 - remexre:master, r=steveklabnik
Mention null_mut on the pointer primitive docs. Also adds a few mentions that both `*const` and `*mut` support functions, when only `*const` was mentioned before.
| -rw-r--r-- | src/libstd/primitive_docs.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index 6746754ebc3..76ef36cc9a7 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -188,9 +188,10 @@ mod prim_unit { } /// Working with raw pointers in Rust is uncommon, /// typically limited to a few patterns. /// -/// Use the [`null`] function to create null pointers, and the [`is_null`] method -/// of the `*const T` type to check for null. The `*const T` type also defines -/// the [`offset`] method, for pointer math. +/// Use the [`null`] and [`null_mut`] functions to create null pointers, and the +/// [`is_null`] method of the `*const T` and `*mut T` types to check for null. +/// The `*const T` and `*mut T` types also define the [`offset`] method, for +/// pointer math. /// /// # Common ways to create raw pointers /// @@ -261,6 +262,7 @@ mod prim_unit { } /// *[See also the `std::ptr` module](ptr/index.html).* /// /// [`null`]: ../std/ptr/fn.null.html +/// [`null_mut`]: ../std/ptr/fn.null_mut.html /// [`is_null`]: ../std/primitive.pointer.html#method.is_null /// [`offset`]: ../std/primitive.pointer.html#method.offset /// [`into_raw`]: ../std/boxed/struct.Box.html#method.into_raw |
