bors 5ead90f13a Auto merge of #12150 - ithinuel:add_misleading_use_of_ok, r=y21
Add lint for `unused_result_ok`

This PR adds a lint to capture the use of `expr.ok();` when the result is not _really_ used.

This could be interpreted as the result being checked (like it is with `unwrap()` or `expect`) but
it actually only ignores the result.

`let _ = expr;` expresses that intent better.

This was also mentionned in #8994 (although not being the main topic of that issue).

changelog: [`misleading_use_of_ok`]: Add new lint to capture `.ok();` when the result is not _really_ used.
2024-08-06 19:01:41 +00:00
..
2024-07-15 08:51:04 +00:00
2024-07-20 12:50:36 +07:00
2024-07-20 12:50:36 +07:00
2024-07-20 12:50:36 +07:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-26 00:23:11 +07:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-06-13 12:24:31 +02:00
2024-06-13 12:24:31 +02:00
2024-06-25 17:50:48 +02:00
2024-07-07 22:05:26 -04:00
2024-07-07 22:05:26 -04:00
2024-06-09 07:47:42 +01:00
2024-07-15 08:51:04 +00:00
2024-07-15 08:51:04 +00:00
2024-07-26 17:51:22 +08:00
2024-07-20 12:50:36 +07:00