Jonathan Brouwer
fe32c706ed
Rollup merge of #156121 - thiago-fealves:suggest-collect-string, r=estebank
...
compiler: suggest `.collect()` when `String` is expected and `Iterator` is found
This commit adds a diagnostic suggestion to help users who forget to call `.collect()` when they have an iterator and the function or variable expects a `String`.
The logic checks if the expected type is `std::string::String` and if the found type implements the `Iterator` trait, if so the compiler provides a suggestion to add `.collect()`
Includes also a UI test to verify if the suggestion appears correctly
2026-05-17 15:52:35 +02:00
..
2026-05-15 04:34:51 +02:00
2026-05-17 01:27:37 +00:00
2026-05-08 14:10:56 +02:00
2026-05-15 20:11:42 +02:00
2026-05-12 17:09:19 +02:00
2026-05-07 22:22:56 +09:00
2026-05-10 16:43:01 +00:00
2026-05-04 16:28:58 +00:00
2026-05-17 01:27:37 +00:00
2026-05-12 18:53:35 +02:00
2026-05-12 17:09:19 +02:00
2026-05-13 15:16:17 +02:00
2026-05-13 12:16:25 -07:00
2026-05-17 01:27:37 +00:00
2026-05-17 01:27:37 +00:00
2026-05-13 08:47:29 +02:00
2026-05-14 16:51:08 +02:00
2026-05-04 16:28:58 +00:00
2026-05-08 15:10:33 +10:00
2026-05-07 20:23:37 +03:00
2026-05-12 17:09:19 +02:00
2026-05-17 01:27:37 +00:00
2026-05-15 20:11:47 +02:00
2026-05-08 15:10:33 +10:00
2026-05-07 22:23:36 +09:00
2026-05-17 15:52:35 +02:00
2026-05-02 17:41:30 +02:00
2026-05-13 20:29:15 +00:00
2026-05-08 15:10:33 +10:00
2026-05-11 21:32:42 +02:00
2026-05-11 16:28:51 -04:00
2026-05-17 15:03:24 +09:00
2026-05-14 16:28:50 +10:00
2026-05-11 16:28:51 -04:00
2026-05-08 15:22:40 +10:00
2026-05-14 16:28:50 +10:00
2026-05-17 15:52:34 +02:00
2026-05-14 16:51:08 +02:00
2026-05-17 01:27:37 +00:00
2026-05-17 01:27:37 +00:00
2026-05-12 21:58:50 +02:00
2026-05-11 21:32:42 +02:00
2026-05-13 02:35:29 +00:00
2026-05-03 03:24:52 +00:00
2026-05-15 20:11:41 +02:00
2026-05-14 16:28:50 +10:00
2026-05-13 20:04:42 +03:00
2026-05-15 04:34:51 +02:00
2026-05-05 12:36:39 +02:00
2026-05-07 02:06:18 +02:00
2026-05-17 01:27:37 +00:00
2026-05-12 21:58:50 +02:00
2026-05-13 11:46:37 +02:00
2026-05-12 17:09:19 +02:00
2026-05-08 15:22:40 +10:00
2026-05-14 19:06:32 +02:00
2026-05-05 12:39:51 +03:00
2026-05-17 01:27:37 +00:00
2026-05-12 20:45:13 +02:00
2026-05-17 01:27:37 +00:00
2026-05-17 15:52:34 +02:00
2026-05-12 21:58:50 +02:00
2026-04-30 16:53:10 +10:00