rust/clippy_dev/src
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
..
setup Merge commit 'ca3b393750' into clippy-subtree-update 2024-04-18 17:48:52 +02:00
dogfood.rs Merge commit '371120bdbf' into clippyup 2023-05-05 17:45:49 +02:00
fmt.rs Sort the config list using dev fmt 2024-07-28 00:55:46 -04:00
lib.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
lint.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
main.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
new_lint.rs Refactor for using config values: 2024-07-17 14:05:49 -04:00
serve.rs Store deprecated lints as an array of tuples. 2024-08-05 09:15:55 -04:00
update_lints.rs Auto merge of #12150 - ithinuel:add_misleading_use_of_ok, r=y21 2024-08-06 19:01:41 +00:00