-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #73910 - cuviper:while-indexing, r=oli-obk
Rewrite a few manual index loops with while-let There were a few instances of this pattern: ```rust while index < vec.len() { let item = &vec[index]; // ... } ``` These can be indexed at once: ```rust while let Some(item) = vec.get(index) { // ... } ``` Particularly in `ObligationForest::process_obligations`, this mitigates a codegen regression found with LLVM 11 (#73526).
- Loading branch information
Showing
2 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters