mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
3f17c5c388
Don't lint manual_let_else in cases where ? would work Don't lint `manual_let_else` where the question mark operator `?` would be sufficient, that is, mostly in cases like: ```Rust let v = if let Some(v) = ex { v } else { return None }; ``` Also, this PR emits the `question_mark` lint for `let...else` patterns that could be written with `?` (also, only `return None` like cases). ``` changelog: [`manual_let_else`]: don't lint in cases where question_mark already lints changelog: [`question_mark`]: lint for `let Some(...) = ex else { return None };` ``` Fixes #8755 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |