Commit 519651a
authored
Rollup merge of #52508 - joshtriplett:dangling-not-sentinel, r=Mark-Simulacrum
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.1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2703 | 2703 | | |
2704 | 2704 | | |
2705 | 2705 | | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
2706 | 2711 | | |
2707 | 2712 | | |
2708 | 2713 | | |
| |||
2834 | 2839 | | |
2835 | 2840 | | |
2836 | 2841 | | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
2837 | 2847 | | |
2838 | 2848 | | |
2839 | 2849 | | |
| |||
0 commit comments