about summary refs log tree commit diff
path: root/library/core/src/ops/range.rs
AgeCommit message (Collapse)AuthorLines
2025-09-02docs(std): add missing closing code block fences in doc commentsAudaciousAxiom-0/+1
2025-08-30Add `#[must_use] and update `cloned` documentationConnor Tsui-2/+6
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com> Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
2025-08-30add feature gate in doc testConnor Tsui-0/+2
2025-08-30add `Bound::copied`Connor Tsui-0/+22
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-12fix typoAda Alakbarova-1/+1
2025-07-23Document (internally) that `Range*<&T> as RangeBounds<T>` impls are ↵Zachary S-0/+30
intentionally not `T: ?Sized`, and document (publically) an alternative.
2025-07-02Remove some unsized tuple impls now that we don't support unsizing tuples ↵Oli Scherer-1/+1
anymore
2025-03-01fix `RangeBounds::is_empty` documentationPeter Jaszkowiak-1/+1
One-sided ranges are never empty
2025-02-19add `IntoBounds::intersect` and `RangeBounds::is_empty`Peter Jaszkowiak-5/+135
2025-02-12add `IntoBounds` traitPeter Jaszkowiak-0/+82
for `range_into_bounds` feature, #136903
2025-02-04Add OneSidedRangeBound to eliminate panic in `split_point_of`Taylor Cramer-4/+42
See discussion in https://github.com/rust-lang/rust/pull/88502/files#r760177240
2024-02-08Bump version placeholdersMark Rousskov-1/+1
2023-11-27stabilise bound_mapDylan DPC-3/+1
2023-10-22Add #[inline] to some recalcitrant ops::range methodsBen Kimock-0/+7
2023-10-05Add more diagnostic items for clippyJason Newcomb-0/+1
2023-08-27Remove parens around .. in documentation snippetAnselm Schüler-1/+1
2023-04-16core is now compilableDeadbeef-6/+3
2023-04-16rm const traits in libcoreDeadbeef-52/+34
2023-02-15Constify `RangeBounds`, `RangeX::contains` and `RangeX::is_empty`.onestacked-38/+60
2022-09-26replace stabilization placeholdersPietro Albini-1/+1
2022-08-27Partially stabilize `bound_as_ref` by stablizing `Bound::as_ref`Ryan Lopopolo-1/+1
See: - #80996 - https://github.com/rust-lang/rust/issues/80996#issuecomment-1194575470
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-1/+1
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-02-22Constify slice indexingDeadbeef-1/+1
2021-11-12add slice take methodsIbraheem Ahmed-0/+18
2021-10-30Add #[must_use] to remaining core functionsJohn Kugelman-0/+1
2021-07-27Update range.rsfrogtd-4/+4
Stop creating a reference then immediately dereferencing it.
2021-07-01Stabilize `Bound::cloned()`Aris Merchant-2/+1
2021-06-07Correct type signature in doc for Bound::as_mutGriffin Smith-1/+1
2021-06-05Add a map method to BoundGriffin Smith-1/+35
Add a map method to std::ops::range::Bound, patterned off of the method of the same name on Option
2021-02-12Rename `Range::ensure_subset_of` to `slice::range`dylni-101/+0
2021-02-12Fix possible soundness issue in `ensure_subset_of`dylni-95/+97
2021-02-12Improve design of `assert_len`dylni-13/+22
2021-01-13Add as_ref and as_mut methods for BoundGriffin Smith-0/+23
Add as_ref and as_mut method for std::ops::range::Bound, patterned off of the methods of the same name on Option.
2020-10-20Check for exhaustion in SliceIndex for RangeInclusiveJosh Stone-0/+14
2020-10-19make exhausted RangeInclusive::end_bound return Excluded(end)Josh Stone-2/+8
2020-10-19Check for exhaustion in RangeInclusive::containsJosh Stone-1/+11
When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false.
2020-10-19Auto merge of #77874 - camelid:range-docs-readability, r=scottmcmbors-40/+52
Improve range docs * Improve code formatting and legibility * Various other readability improvements
2020-10-18Improve range docsCamelid-40/+52
* Mention that `RangeFull` is a ZST and thus a singleton * Improve code formatting and legibility * Various other readability improvements
2020-09-18Rename method to `assert_len`dylni-41/+41
2020-09-18Fix doctestsdylni-0/+8
2020-09-18Fix linksdylni-2/+2
2020-09-18Move `slice::check_range` to `RangeBounds`dylni-0/+82
2020-08-26apply bootstrap cfgsPietro Albini-7/+7
2020-08-24Stabilize Range[Inclusive]::is_emptyScott McMurray-12/+2
I would like to propose these two simple methods for stabilization: - Knowing that a range is exhaused isn't otherwise trivial - Clippy would like to suggest them, but had to do extra work to disable that path <https://github.com/rust-lang/rust-clippy/issues/3807> because they're unstable - These work on `PartialOrd`, consistently with now-stable `contains`, and are thus more general than iterator-based approaches that need `Step` - They've been unchanged for some time, and have picked up uses in the compiler - Stabilizing them doesn't block any future iterator-based is_empty plans, as the inherent ones are preferred in name resolution
2020-08-21Remove links that get imported from the preludeLeSeulArtichaut-8/+0
2020-08-21Use intra-doc-links in `core::ops::*`LeSeulArtichaut-16/+16
2020-08-16hir: introduce lang items for AST loweringDavid Wood-0/+7
This commit adds new lang items which will be used in AST lowering once `QPath::LangItem` is introduced. Co-authored-by: Matthew Jasper <mjjasper1@gmail.com> Signed-off-by: David Wood <david@davidtw.co>
2020-07-27mv std libs to library/mark-0/+885