about summary refs log tree commit diff
path: root/library/core/src/range.rs
AgeCommit message (Collapse)AuthorLines
2025-09-12Constify Eq, Ord, PartialOrdEvgenii Zheltonozhskii-2/+4
2025-09-10Rollup merge of #144765 - Qelxiros:range-inclusive-last, r=jhprattMatthias Krüger-19/+121
inclusive `Range`s: change `end` to `last` Tracking issue: rust-lang/rust#125687 ACP: rust-lang/libs-team#511
2025-09-08change end to lastJeremy Smart-19/+121
2025-09-01Constify conversion traitsltdk-4/+5
2025-07-23Document (internally) that `Range*<&T> as RangeBounds<T>` impls are ↵Zachary S-0/+18
intentionally not `T: ?Sized`, and document (publically) an alternative.
2025-07-15constify `SliceIndex` traitOli Scherer-5/+11
2025-02-18update `cfg(bootstrap)`Josh Stone-3/+3
2025-02-12add `IntoBounds` traitPeter Jaszkowiak-1/+27
for `range_into_bounds` feature, #136903
2025-01-30implement unstable `new_range` featurePeter Jaszkowiak-0/+3
for RFC 3550, tracking issue #123741
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-4/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-26Fix doc nitsJohn Arundel-3/+3
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
2024-07-05add `new_range_api` for RFC 3550Peter Jaszkowiak-0/+494
This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC. Having `From` is highly convenient and the assertion is unlikely to be a problem in practice. This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum. Currently the iterators are just wrappers around the old range types, and most other trait impls delegate to the old rage types as well. Also includes an `.iter()` shorthand for `.clone().into_iter()`