]> git.lizzy.rs Git - rust.git/commit
Fix `option_if_let_else`
authorJason Newcomb <jsnewcomb@pm.me>
Mon, 16 Aug 2021 19:42:52 +0000 (15:42 -0400)
committerJason Newcomb <jsnewcomb@pm.me>
Mon, 16 Aug 2021 20:12:00 +0000 (16:12 -0400)
commit8b3ca9a315aeb9ece9ca9df27e69f581629c51aa
treeb8476cecfd22b172cbd076e2cfb98b4b0ab17de2
parent983e5b877ef82f84bd463d74ba6035d75c456d73
Fix `option_if_let_else`
* `break` and `continue` statments local to the would-be closure are allowed
* don't lint in const contexts
* don't lint when yield expressions are used
* don't lint when the captures made by the would-be closure conflict with the other branch
* don't lint when a field of a local is used when the type could be pontentially moved from
* in some cases, don't lint when scrutinee expression conflicts with the captures of the would-be closure
clippy_lints/src/option_if_let_else.rs
clippy_utils/src/lib.rs
tests/ui/option_if_let_else.fixed
tests/ui/option_if_let_else.rs
tests/ui/option_if_let_else.stderr