diff options
| author | Josh Stone <jistone@redhat.com> | 2020-06-30 17:53:45 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2020-06-30 17:53:45 -0700 |
| commit | 47425e476b8fd087799d1229a23f7aa81c1835bf (patch) | |
| tree | 09c2227687eb29116de902a17b9970ccd7ed3f2a /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 0ca7f74dbd23a3e8ec491cd3438f490a3ac22741 (diff) | |
| download | rust-47425e476b8fd087799d1229a23f7aa81c1835bf.tar.gz rust-47425e476b8fd087799d1229a23f7aa81c1835bf.zip | |
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).
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
