rust/library/core/src
Mara Bos 801684620b
Rollup merge of #81107 - scottmcm:nonzero-is_power_of_two, r=kennytm
Add NonZeroUn::is_power_of_two

This saves instructions on both new and old machines <https://rust.godbolt.org/z/4fjTMz>
- On the default x64 target (with no fancy instructions available) it saves a few instructions by not needing to also check for zero.
- On newer targets (with BMI1) it uses `BLSR` for super-short assembly.

This can be used for things like checks against alignments stored in `NonZeroUsize`.
2021-01-17 12:25:01 +00:00
..
alloc Auto merge of #79827 - tmiasko:size-align, r=kennytm 2021-01-03 03:43:29 +00:00
array Add [T; N]::each_ref and [T; N]::each_mut 2021-01-11 01:09:22 -08:00
char Rollup merge of #79502 - Julian-Wollersberger:from_char_for_u64, r=withoutboats 2021-01-10 16:55:53 +09:00
convert Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
fmt Rollup merge of #80991 - calebsander:fix/fmt-link, r=m-ou-se 2021-01-14 18:00:31 +00:00
future Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
hash fix aliasing issues in SipHasher 2020-10-31 16:26:06 +01:00
iter Rollup merge of #80670 - the8472:fix-zip-trusted-random-access-composition, r=m-ou-se 2021-01-16 17:29:51 +00:00
macros Fix formatting specifiers doc link 2021-01-13 15:05:39 -05:00
mem Rollup merge of #80600 - CoffeeBlend:maybe_uninit_array_assume_init, r=dtolnay 2021-01-12 16:13:24 +09:00
num Add NonZeroUn::is_power_of_two 2021-01-16 19:27:51 -08:00
ops Add as_ref and as_mut methods for Bound 2021-01-13 21:16:26 -05:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
ptr extend comment 2021-01-02 16:58:38 +01:00
slice Rename as_chunks_mut_unchecked -> as_chunks_unchecked_mut 2021-01-15 21:25:30 -08:00
str Auto merge of #77858 - ijackson:split-inclusive, r=KodrAus 2021-01-13 07:38:58 +00:00
sync Rollup merge of #80966 - KodrAus:deprecate/spin_loop_hint, r=m-ou-se 2021-01-14 18:00:14 +00:00
task stabilize the poll_map feature 2021-01-13 14:51:27 +10:00
unicode Privatize some of libcore unicode_internals 2020-12-07 16:16:42 +03:00
any.rs Apply suggestions from code review 2020-12-09 23:13:24 +00:00
ascii.rs Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
bool.rs Stabilise then 2020-11-22 13:45:14 +00:00
borrow.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
cell.rs add tracking issue to cell_filter_map 2021-01-16 10:40:36 +10:00
clone.rs Improve readability 2020-09-01 19:56:32 +02:00
cmp.rs fix broken link in PartialEq doc 2021-01-09 22:40:48 -08:00
default.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
ffi.rs Properly define va_arg and va_list for aarch64-apple-darwin 2020-10-25 21:37:01 -04:00
hint.rs Fixed documentation error 2021-01-03 19:54:54 +02:00
internal_macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs Auto merge of #80290 - RalfJung:less-intrinsic-write, r=lcnr 2021-01-16 17:28:32 +00:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs remove incomplete features from std 2021-01-01 19:57:10 +01:00
marker.rs Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay 2020-11-23 07:00:30 +00:00
option.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
panic.rs Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
panicking.rs Bump bootstrap compiler version 2020-11-19 19:23:36 -05:00
pin.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw.rs Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
result.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
time.rs Remove Duration::MIN entirely 2020-10-27 15:48:58 -07:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00