diff options
| author | bors <bors@rust-lang.org> | 2022-03-10 12:32:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-10 12:32:01 +0000 |
| commit | ba14a836c7038da21f5e102aacc7e6d5964f79a6 (patch) | |
| tree | 74faca104bf8154e790c595a8416c7b1e5b50869 /library/core/src/ops/range.rs | |
| parent | 282778aee26166754315815552bae454fc968960 (diff) | |
| parent | 6bbaca7d030b2c778a7a7b9762f3afb2a2408ff5 (diff) | |
| download | rust-ba14a836c7038da21f5e102aacc7e6d5964f79a6.tar.gz rust-ba14a836c7038da21f5e102aacc7e6d5964f79a6.zip | |
Auto merge of #94802 - matthiaskrgr:rollup-4plu0fi, r=matthiaskrgr
Rollup of 5 pull requests
Successful merges:
- #92150 (Improve suggestion when casting usize to (possibly) wide pointer)
- #94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`)
- #94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`)
- #94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`)
- #94788 (Account for suggestions for complete removal of lines)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/ops/range.rs')
| -rw-r--r-- | library/core/src/ops/range.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index 11367220678..5029e0560b8 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -446,7 +446,7 @@ impl RangeInclusive<usize> { /// Converts to an exclusive `Range` for `SliceIndex` implementations. /// The caller is responsible for dealing with `end == usize::MAX`. #[inline] - pub(crate) fn into_slice_range(self) -> Range<usize> { + pub(crate) const fn into_slice_range(self) -> Range<usize> { // If we're not exhausted, we want to simply slice `start..end + 1`. // If we are exhausted, then slicing with `end + 1..end + 1` gives us an // empty range that is still subject to bounds-checks for that endpoint. |
