diff options
| author | bors <bors@rust-lang.org> | 2021-05-27 13:05:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-27 13:05:57 +0000 |
| commit | ea78d1edf364dd3a4b5ff430f76e2bdd3a713a45 (patch) | |
| tree | 833d19a86e0ddd53516c2907505bd37876afdabe /compiler/rustc_codegen_llvm/src | |
| parent | 8d1e3d3b74fa80ce14af6ec143f061897684582b (diff) | |
| parent | 04d34a97d1d47676331479e24e5afaf2583cb8e5 (diff) | |
| download | rust-ea78d1edf364dd3a4b5ff430f76e2bdd3a713a45.tar.gz rust-ea78d1edf364dd3a4b5ff430f76e2bdd3a713a45.zip | |
Auto merge of #85737 - scottmcm:vec-calloc-option-nonzero, r=m-ou-se
Enable Vec's calloc optimization for Option<NonZero> Someone on discord noticed that `vec![None::<NonZeroU32>; N]` wasn't getting the optimization, so here's a PR 🙃 We can certainly do this in the standard library because we know for sure this is ok, but I think it's also a necessary consequence of documented guarantees like those in https://doc.rust-lang.org/std/option/#representation and https://doc.rust-lang.org/core/num/struct.NonZeroU32.html It feels weird to do this without adding a test, but I wasn't sure where that would belong. Is it worth adding codegen tests for these?
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
