rust/library
bors 16a0d03698 Auto merge of #97521 - SkiFire13:clarify-vec-as-ptr, r=Dylan-DPC
Clarify the guarantees of Vec::as_ptr and Vec::as_mut_ptr when there's no allocation

Currently the documentation says they return a pointer to the vector's buffer, which has the implied precondition that the vector allocated some memory. However `Vec`'s documentation also specifies that it won't always allocate, so it's unclear whether the pointer returned is valid in that case. Of course you won't be able to read/write actual bytes to/from it since the capacity is 0, but there's an exception: zero sized read/writes. They are still valid as long as the pointer is not null and the memory it points to wasn't deallocated, but `Vec::as_ptr` and `Vec::as_mut_ptr` don't specify that's not the case. This PR thus specifies they are actually valid for zero sized reads since `Vec` is implemented to hold a dangling pointer in those cases, which is neither null nor was deallocated.
2022-05-31 12:14:51 +00:00
..
alloc Auto merge of #97521 - SkiFire13:clarify-vec-as-ptr, r=Dylan-DPC 2022-05-31 12:14:51 +00:00
backtrace@4e5a3f7292 update libbacktrace 2022-05-20 09:30:26 +02:00
core Auto merge of #97526 - Nilstrieb:unicode-is-printable-fastpath, r=joshtriplett 2022-05-31 09:34:00 +00:00
panic_abort
panic_unwind
portable-simd Finish bumping stage0 2022-05-27 07:36:17 -04:00
proc_macro proc_macro: don't pass a client-side function pointer through the server. 2022-05-27 19:29:21 +00:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #97574 - Dylan-DPC:rollup-jq850l6, r=Dylan-DPC 2022-05-31 06:53:02 +00:00
stdarch@28335054b1
test
unwind Auto merge of #97033 - nbdd0121:unwind3, r=Amanieu 2022-05-19 04:04:40 +00:00