rust/library
bors 4514fb98d5 Auto merge of #112229 - clarfonthey:range-iter-count, r=dtolnay
Specialize count for range iterators

Since `size_hint` is already specialized, it feels apt to specialize `count` as well. Without any specialized version of `ExactSizeIterator::len` or `Step::steps_between`, this feels like a more reliable way of accessing this without having to rely on knowing that `size_hint` is correct.

In my case, this is particularly useful to access the `steps_between` implementation for `char` from the standard library without having to compute it manually.

I didn't think it was worth modifying the `Step` trait to add a version of `steps_between` that used native overflow checks since this is just doing one subtraction in most cases anyway, and so I decided to make the inclusive version use `checked_add` so it didn't have this lopsided overflow-checks-but-only-sometimes logic.
2023-09-16 16:43:31 +00:00
..
alloc Auto merge of #114494 - est31:extend_useless_ptr_null_checks, r=jackh726 2023-09-16 03:40:20 +00:00
backtrace@99faef833f Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
core Auto merge of #112229 - clarfonthey:range-iter-count, r=dtolnay 2023-09-16 16:43:31 +00:00
panic_abort Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
panic_unwind Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
portable-simd remove repetitive words 2023-07-31 16:13:02 +08:00
proc_macro Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Disabled socketpair for Vita 2023-09-13 16:41:38 +03:00
stdarch@6100854c4b Bump stdarch submodule 2023-09-05 19:56:20 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
unwind Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00