]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #52508 - joshtriplett:dangling-not-sentinel, r=Mark-Simulacrum
authorkennytm <kennytm@gmail.com>
Sun, 22 Jul 2018 14:10:13 +0000 (22:10 +0800)
committerGitHub <noreply@github.com>
Sun, 22 Jul 2018 14:10:13 +0000 (22:10 +0800)
Document that Unique::empty() and NonNull::dangling() aren't sentinel values

The documentation of Unique::empty() and NonNull::dangling() could
potentially suggest that they work as sentinel values indicating a
not-yet-initialized pointer. However, they both declare a non-null
pointer equal to the alignment of the type, which could potentially
reference a valid value of that type (specifically, the first such valid
value in memory). Explicitly document that the return value of these
functions does not work as a sentinel value.


Trivial merge