]> git.lizzy.rs Git - rust.git/commit
Match on bool should be replaced with if..else block
authorVikas Kumar <kr.vikas@gmail.com>
Tue, 20 Oct 2015 17:18:48 +0000 (10:18 -0700)
committerVikas Kumar <kr.vikas@gmail.com>
Tue, 20 Oct 2015 17:18:48 +0000 (10:18 -0700)
commit2951b70d1575f62771ac2da007ef426f9ac600c6
tree9a3482bff9cd27559b3e7d13244fc0f869a32419
parentdea087dd17d57e7a5e8863f39dfc86f2f8a4b309
Match on bool should be replaced with if..else block

1. Added another conditional in `check_expr` impl to lint if match expr
is a bool.
2. Test cases.
src/lib.rs
src/matches.rs
tests/compile-fail/matches.rs