mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 18:57:19 +00:00

Set both `nuw` and `nsw` in slice size calculation There's an old note in the code to do this, and now that [LLVM-C has an API for it](f0b8ff1251/llvm/include/llvm-c/Core.h (L4403-L4408)
), we might as well. And it's been there since what looks like LLVM 17de9b6aa341
so doesn't even need to be conditional. (There's other places, like `RawVecInner` or `Layout`, that might want to do things like this too, but I'll leave those for a future PR.)
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.