Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: automation/bors/try
Choose a head ref
  • 4 commits
  • 7 files changed
  • 2 contributors

Commits on Aug 9, 2025

  1. Optimize SliceIndex impl for RangeInclusive

    The check for `self.end() == usize::MAX` can be combined with the `self.end() +
    1 > slice.len()` check into `self.en() >= slice.len()`, since `self.end() <
    slice.len()` implies both `self.end() <= slice.len()` and `self.end() <
    usize::MAX`.
    
    The tradeoff is slightly worse error reporting: previously there would be a
    special panic message in the `range.end() == usize::MAX` case.
    Kmeakin committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    a2eae7f View commit details
    Browse the repository at this point in the history
  2. Optimize std::slice::range

    Same reasoning as previous commit.
    Kmeakin committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    e1ac2f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd63d02 View commit details
    Browse the repository at this point in the history
  4. Auto merge of #145024 - Kmeakin:km/optimize-slice-index/v3, r=<try>

    Optimize indexing slices and strs with inclusive ranges
    rust-bors[bot] authored Aug 9, 2025
    Configuration menu
    Copy the full SHA
    4249615 View commit details
    Browse the repository at this point in the history
Loading