about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-30 01:31:18 +0200
committerGitHub <noreply@github.com>2018-03-30 01:31:18 +0200
commit801deaeea28afa786f27053c1ea114c7f444be04 (patch)
tree745f10a1e799ae0c315b9bdc8a9398ffe517972d
parentdd5f17abb5417ed66395d1f60b3ea5daa35ab17d (diff)
parent39fe29bf0ca4d105a6118b4a1ca5ce17a59b71b1 (diff)
downloadrust-801deaeea28afa786f27053c1ea114c7f444be04.tar.gz
rust-801deaeea28afa786f27053c1ea114c7f444be04.zip
Rollup merge of #49473 - joshtriplett:nonnull-size, r=steveklabnik
src/libcore/ptr.rs: Fix documentation for size of `Option<NonNull<T>>`

Seems more useful to say that it has the same size as `*mut T`.
-rw-r--r--src/libcore/ptr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index aebd50d9c6b..5a54de06b5e 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -2653,7 +2653,7 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
 ///
 /// Unlike `*mut T`, the pointer must always be non-null, even if the pointer
 /// is never dereferenced. This is so that enums may use this forbidden value
-/// as a discriminant -- `Option<NonNull<T>>` has the same size as `NonNull<T>`.
+/// as a discriminant -- `Option<NonNull<T>>` has the same size as `*mut T`.
 /// However the pointer may still dangle if it isn't dereferenced.
 ///
 /// Unlike `*mut T`, `NonNull<T>` is covariant over `T`. If this is incorrect