bors
aa5dbee3eb
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 .
2023-08-24 15:05:17 +00:00
..
2023-07-30 13:18:33 +02:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00
2023-08-24 12:52:35 +00:00
2023-08-24 12:52:35 +00:00
2023-08-24 12:52:35 +00:00
2023-08-24 12:52:35 +00:00
2023-08-11 16:51:50 +08:00
2023-08-24 15:05:17 +00:00
2023-08-11 16:51:50 +08:00
2023-08-20 15:52:38 +02:00
2023-08-22 20:15:29 +00:00
2023-08-22 20:15:29 +00:00
2023-08-22 20:15:29 +00:00
2023-08-20 15:52:40 +02:00
2023-08-24 11:10:52 +00:00
2023-08-09 14:17:54 +08:00
2023-08-21 18:45:51 +07:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00
2023-08-24 12:52:35 +00:00
2023-08-23 20:05:14 -04:00
2023-08-23 21:57:18 +09:00
2023-08-08 19:23:41 +00:00
2023-08-20 08:11:08 +00:00
2023-08-18 19:57:41 +02:00
2023-08-24 11:10:52 +00:00
2023-08-18 06:29:38 +00:00
2023-08-23 11:12:30 -07:00
2023-07-29 08:47:21 +08:00
2023-08-24 11:10:52 +00:00
2023-08-22 16:16:32 +00:00
2023-08-22 12:26:35 -04:00
2023-07-30 13:18:33 +02:00
2023-08-23 20:05:14 -04:00
2023-08-13 16:38:50 +00:00
2023-08-23 20:05:14 -04:00
2023-08-24 00:42:46 +00:00
2023-08-20 15:52:38 +02:00
2023-08-22 22:04:49 +00:00
2023-08-20 15:52:38 +02:00
2023-08-24 12:52:35 +00:00
2023-07-19 16:37:09 +00:00
2023-08-24 12:52:35 +00:00
2023-08-14 07:22:48 +00:00
2023-08-23 20:05:14 -04:00
2023-08-24 02:24:25 +00:00
2023-08-24 11:10:52 +00:00
2023-08-24 11:10:52 +00:00
2023-08-22 21:47:46 +03:00
2023-08-24 12:52:35 +00:00
2023-08-11 09:30:41 +00:00
2023-08-24 11:10:52 +00:00
2023-08-18 23:55:28 +02:00
2023-07-14 13:27:35 +01:00
2023-07-27 18:24:08 +00:00
2023-08-09 23:00:00 +02:00
2023-08-23 20:05:14 -04:00