]> git.lizzy.rs Git - rust.git/commit
Auto merge of #93455 - asquared31415:vec-zero-opts, r=thomcc
authorbors <bors@rust-lang.org>
Sun, 4 Sep 2022 20:33:50 +0000 (20:33 +0000)
committerbors <bors@rust-lang.org>
Sun, 4 Sep 2022 20:33:50 +0000 (20:33 +0000)
commit289279de116707f28cf9c18e4bbb8c6ec84ad75b
tree79ae28ef2d3ca02140b4e550eb00b87d68e6ce5c
parent0ebd3ab63aa08337bb4e4600358679262ce8d242
parent80e035c9e4f43bba282ec061dcbeae44ddb20f5f
Auto merge of #93455 - asquared31415:vec-zero-opts, r=thomcc

Implement internal `IsZero` for Wrapping and Saturating for `Vec` optimizations

This implements the `IsZero` trait for the `Wrapping` and `Saturating` types so that users of these types can get the improved performance from the specialization of creating a `Vec` from a single element repeated when it has a zero bit pattern (example `vec![0_i32; 500]`, or after this PR `vec![Wrapping(0_i32); 500]`)

CC #60978