about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2018-03-29 09:43:26 +0200
committerJosh Triplett <josh@joshtriplett.org>2018-03-29 09:46:16 +0200
commit39fe29bf0ca4d105a6118b4a1ca5ce17a59b71b1 (patch)
tree3cbf9e9f4919ccd585ec875396f0aff9bcbf726d
parent361509320c882ee76f0d1359f842dec4637e6b08 (diff)
downloadrust-39fe29bf0ca4d105a6118b4a1ca5ce17a59b71b1.tar.gz
rust-39fe29bf0ca4d105a6118b4a1ca5ce17a59b71b1.zip
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