Skip to content

Commit dfcd0b9

Browse files
authored
Merge pull request rust-lang#238 from joshtriplett/nonnull-size
1.25 announcement: Fix the description of the size of `Option<NonNull<T>>`
2 parents 4f268aa + 3f5141d commit dfcd0b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2018-03-29-Rust-1.25.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ See the [detailed release notes][notes] for more.
100100
The biggest story in libraries this release is [`std::ptr::NonNull<T>`]. This type
101101
is similar to `*mut T`, but is non-null and covariant. This blog post isn't the right
102102
place to explain variance, but in a nutshell, `NonNull<T>`, well, guarantees that it
103-
won't be null, which means that `Option<NonNull<T>>` is the same size as `Option<T>`.
103+
won't be null, which means that `Option<NonNull<T>>` has the same size as `T`.
104104
If you're building a data structure with unsafe code, `NonNull<T>` is often the right
105105
type for you!
106106

0 commit comments

Comments
 (0)