rust/library/core/src
bors ee9a9f84c5 Auto merge of #124793 - scottmcm:simplify-as-chunks, r=Nilstrieb
Implement `as_chunks` with `split_at_unchecked`

We were discussing various ways to do [this on Discord](https://discord.com/channels/273534239310479360/273541522815713281/1236946363120619521), and in the process I noticed that <https://rust.godbolt.org/z/1P16P37Go> is emitting a panic path inside `as_chunks`.  It optimizes out in release, but we could just not do that in the first place.

We're already doing unsafe code that depends on this value being calculated correctly, so might as well call `split_at_unchecked` instead of `split_at`.
2024-05-09 01:55:46 +00:00
..
alloc alloc::Layout: explicitly document size invariant on the type level 2024-03-25 20:18:46 +01:00
array Stabilize generic `NonZero`. 2024-04-22 18:48:47 +02:00
ascii implement `Default` for `AsciiChar` 2024-02-13 12:04:44 +01:00
async_iter Hide async_gen_internals from standard library documentation 2024-04-05 18:54:38 -07:00
cell impl get_mut_or_init and get_mut_or_try_init for OnceCell and OnceLock 2024-03-27 16:16:08 +08:00
char Add a lower bound check to `unicode-table-generator` output 2024-04-20 10:16:45 +02:00
cmp Use generic `NonZero` everywhere in `core`. 2024-02-22 15:17:33 +01:00
convert Remove `From` impls for unstable types that break inference 2024-04-11 18:04:31 -04:00
ffi Rollup merge of #124593 - GKFX:cstr-literals-in-api-docs, r=workingjubilee 2024-05-03 20:33:46 +02:00
fmt chore: fix some typos in comments 2024-04-24 13:58:51 +08:00
future Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
hash Add fn const BuildHasherDefault::new 2024-03-29 17:10:17 +01:00
intrinsics Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
io core: panic on overflow in `BorrowedCursor` 2024-04-11 18:33:46 +02:00
iter Use generic `NonZero`. 2024-05-08 21:37:55 +02:00
macros Workaround rustfmt bug replacing type ascription 2024-05-01 23:23:00 -04:00
mem Rollup merge of #123480 - Nadrieril:impl-all-derefpures, r=compiler-errors 2024-05-03 06:04:19 +02:00
net Avoid invalid socket address in length calculation 2024-04-11 17:27:23 +02:00
num Use generic `NonZero` in examples. 2024-05-08 21:37:53 +02:00
ops Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
panic Replace version placeholders for 1.79 2024-05-01 21:01:51 -04:00
prelude Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
ptr Avoid a cast in `ptr::slice_from_raw_parts(_mut)` 2024-05-06 01:53:54 -07:00
slice Auto merge of #124793 - scottmcm:simplify-as-chunks, r=Nilstrieb 2024-05-09 01:55:46 +00:00
str Rollup merge of #124678 - UserIsntAvailable:feat/stabilize-split-at-checked, r=jhpratt 2024-05-03 23:34:24 -04:00
sync Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
task Rollup merge of #122201 - coolreader18:doc-clone_from, r=dtolnay 2024-04-17 18:01:37 +02:00
unicode Add a lower bound check to `unicode-table-generator` output 2024-04-20 10:16:45 +02:00
any.rs Improve wording in std::any explanation 2024-03-29 10:10:52 -07:00
arch.rs Rust is a proper name: rust → Rust 2024-03-07 07:49:22 +01:00
ascii.rs Use generic `NonZero` internally. 2024-02-15 08:09:42 +01:00
asserting.rs
bool.rs
borrow.rs
cell.rs Rollup merge of #123480 - Nadrieril:impl-all-derefpures, r=compiler-errors 2024-05-03 06:04:19 +02:00
clone.rs Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))" 2024-04-10 13:50:27 -04:00
cmp.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
default.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
error.md
error.rs style library/core/src/error.rs 2024-03-02 16:03:23 +08:00
escape.rs Use generic `NonZero` internally. 2024-02-15 08:09:42 +01:00
hint.rs Add support for Arm64EC to the Standard Library 2024-04-15 16:05:16 -07:00
internal_macros.rs add track_caller for arith ops 2023-11-24 00:54:06 +08:00
intrinsics.rs Rollup merge of #124293 - oli-obk:miri_intrinsic_fallback_body, r=RalfJung 2024-05-04 12:37:22 +02:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #124678 - UserIsntAvailable:feat/stabilize-split-at-checked, r=jhpratt 2024-05-03 23:34:24 -04:00
marker.rs Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))" 2024-04-10 13:50:27 -04:00
option.rs panic_str only exists for the migration to 2021 panic macros 2024-03-26 08:11:34 +01:00
panic.rs panic_str only exists for the migration to 2021 panic macros 2024-03-26 08:11:34 +01:00
panicking.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
pin.rs Rollup merge of #123480 - Nadrieril:impl-all-derefpures, r=compiler-errors 2024-05-03 06:04:19 +02:00
primitive.rs
primitive_docs.rs Rollup merge of #124750 - ultrabear:ultrabear_softfloatdoc, r=workingjubilee 2024-05-05 16:42:48 +02:00
result.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00
time.rs Fix cannot usage in time.rs 2024-04-24 17:37:44 +00:00
tuple.rs Rollup merge of #118307 - scottmcm:tuple-eq-simpler, r=joshtriplett 2024-02-11 08:25:41 +01:00
ub_checks.rs export assert_unsafe_precondition macro for std-internal use 2024-04-22 19:02:37 +02:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00