2 ms·
In Rust, creating a reference to uninitialized data is undefined behavior, even if you don't access the data through it[1]. The optimizer assumes all references
by GrantMoyer 2y ago
In Rust, creating a reference to uninitialized data is undefined behavior, even if you don't access the data through it[1]. The optimizer assumes all references are intialized.
[1]: https://doc.rust-lang.org/std/ptr/#pointer-to-reference-conversion https://doc.rust-lang.org/std/ptr/#pointer-to-reference-conv...