mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 12:23:22 +00:00
![]() I was looking into `array::IntoIter` optimization, and noticed that it wasn't annotating the loads with `noundef` for simple things like `array::IntoIter<i32, N>`. Turned out to be a more general problem as `MaybeUninit::assume_init_read` isn't marking the load as initialized (<https://rust.godbolt.org/z/Mxd8TPTnv>), which is unfortunate since that's basically its reason to exist. This PR lowers `ptr::read(p)` to `copy *p` in MIR, which fortuitiously also improves the IR we give to LLVM for things like `mem::replace`. |
||
---|---|---|
.. | ||
locales | ||
src | ||
Cargo.toml | ||
README.md |
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.