]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #62634 - llogiq:uninit-array-docs, r=RalfJung
authorMark Rousskov <mark.simulacrum@gmail.com>
Mon, 15 Jul 2019 23:55:04 +0000 (19:55 -0400)
committerGitHub <noreply@github.com>
Mon, 15 Jul 2019 23:55:04 +0000 (19:55 -0400)
commitcaf10b5ffe6977e79f8d5f1bb407d99d2b015b4a
treefb978b5d347bf9e155faab504c586249b403c8a5
parent64ceba73afca4eddf1409427413fed5ed6711270
parentcb3aa4ce2c5de3ffb38afb2ca6d7cf19cb3e9be7
Rollup merge of #62634 - llogiq:uninit-array-docs, r=RalfJung

Less unsafe in the array example of MaybeUninit docs

I believe this is an acceptable way to initialize elements of `[MaybeUninit<T>; _]` arrays. Miri agrees. Conceptually, we are working at the array level, above the `MaybeUninit`, and as we are replacing it wholesale, this should pose no problem to soundness. And the code is easier to read.

r? @RalfJung