diff options
| author | bors <bors@rust-lang.org> | 2019-03-25 00:38:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-25 00:38:15 +0000 |
| commit | 46914715e2427e376ee9593b62ff8661caadee93 (patch) | |
| tree | 24a88b34e85ecd82a50d972c423d57449871c12f /src/librustdoc/html/static/source-script.js | |
| parent | 3752b3d3a56bf3eabb588b7d595cd1f8accc0286 (diff) | |
| parent | 66202c113a5397198757d1eb09b78eb0b9b368b1 (diff) | |
| download | rust-46914715e2427e376ee9593b62ff8661caadee93.tar.gz rust-46914715e2427e376ee9593b62ff8661caadee93.zip | |
Auto merge of #59195 - estebank:for-loop-move, r=petrochenkov
When moving out of a for loop head, suggest borrowing it
When encountering code like the following, suggest borrowing the for loop
head to avoid moving it into the for loop pattern:
```
fn main() {
let a = vec![1, 2, 3];
for i in &a {
for j in a {
println!("{} * {} = {}", i, j, i * j);
}
}
}
```
Fix #25534.
Diffstat (limited to 'src/librustdoc/html/static/source-script.js')
0 files changed, 0 insertions, 0 deletions
