about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/inefficient_to_string.fixed
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-24 15:05:17 +0000
committerbors <bors@rust-lang.org>2023-08-24 15:05:17 +0000
commitaa5dbee3ebff8703456e8be3b5fb368fc68fe0d1 (patch)
treed7fa060343e7116d8ef8c1b4badec250b42aa48f /src/tools/clippy/tests/ui/inefficient_to_string.fixed
parent18be2728bd0d59c8fc74311de365a52a2d5e3eee (diff)
parentc1a7af0f2a691c2e74479156475018b497f3c288 (diff)
downloadrust-aa5dbee3ebff8703456e8be3b5fb368fc68fe0d1.tar.gz
rust-aa5dbee3ebff8703456e8be3b5fb368fc68fe0d1.zip
Auto merge of #115147 - estebank:issue-114311, r=davidtwco
Suggest mutable borrow on read only for-loop that should be mutable

```
error[E0596]: cannot borrow `*test` as mutable, as it is behind a `&` reference
  --> $DIR/suggest-mut-iterator.rs:22:9
   |
LL |     for test in &tests {
   |                 ------ this iterator yields `&` references
LL |         test.add(2);
   |         ^^^^ `test` is a `&` reference, so the data it refers to cannot be borrowed as mutable
   |
help: use a mutable iterator instead
   |
LL |     for test in &mut tests {
   |                  +++
```

Fix #114311.
Diffstat (limited to 'src/tools/clippy/tests/ui/inefficient_to_string.fixed')
0 files changed, 0 insertions, 0 deletions