diff options
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. |
