about summary refs log tree commit diff
path: root/library/core/src/slice/rotate.rs
AgeCommit message (Collapse)AuthorLines
2025-07-11slice: Mark `rotate_left`, `rotate_right` unstably constokaneco-7/+17
2025-03-06library: Use size_of from the prelude instead of importedThalia Archibald-3/+3
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-01-29add inline attribute and codegen testedwloef-0/+4
2025-01-29split slice::ptr_rotate into three separate algorithms, to hopefully help ↵edwloef-174/+195
inlining
2025-01-21optimize slice::ptr_rotate for compile-time-constant small rotatesedwloef-161/+166
2025-01-20core: add `#![warn(unreachable_pub)]`Urgau-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+1
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-29make `ptr::rotate` smaller when using `optimize_for_size`Folkert-2/+6
code to reproduce https://github.com/folkertdev/optimize_for_size-slice-rotate In the example the size of `.text` goes down from 1624 to 276 bytes.
2022-09-22Make ZST checks in core/alloc more readableScott McMurray-2/+2
There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff. This lets them be `T::IS_ZST` instead of `mem::size_of::<T>() == 0` every time, making them both more readable and more terse. *Not* proposed for stabilization at this time. Would be `pub(crate)` except `alloc` wants to use it too. (And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.)
2021-12-14Fix a bunch of typosFrank Steffahn-3/+3
2021-07-14Add safety comments in private core::slice::rotate::ptr_rotate functionAlexis Bourget-2/+54
2020-07-27mv std libs to library/mark-0/+182