6b6b698988
Use inline const blocks to create arrays of `MaybeUninit`. This PR contains 2 changes enabled by the fact that [`inline_const` is now stable](https://github.com/rust-lang/rust/pull/104087), and was split out of #125082. 1. Use inline const instead of `unsafe` to construct arrays in `MaybeUninit` examples. Rationale: Demonstrate good practice of avoiding `unsafe` code where it is not strictly necessary. 4. Use inline const instead of `unsafe` to implement `MaybeUninit::uninit_array()`. This is arguably giving the compiler more work to do, in exchange for eliminating just one single internal unsafe block, so it's less certain that this is good on net. r? `@Nilstrieb` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@5e05efa879 | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@df3618d9f3 | ||
sysroot | ||
test | ||
unwind |