]> git.lizzy.rs Git - rust.git/commit
Prevent `replace_consts` lint within match patterns
authorKrishna Veera Reddy <veerareddy@email.arizona.edu>
Tue, 31 Dec 2019 18:33:15 +0000 (10:33 -0800)
committerKrishna Veera Reddy <veerareddy@email.arizona.edu>
Tue, 31 Dec 2019 18:33:15 +0000 (10:33 -0800)
commit84a60c3186fe6a0656da43358cea00cea7319b83
tree994babc05a8f845f5bace76eb2bcab36264c6213
parent99dd0bb653f5ec3767b899c939468512abef0f9c
Prevent `replace_consts` lint within match patterns

Currently `replace_consts` lint applies within match patterns but
the suggestion is incorrect as function calls are disallowed in
them. To fix this we prevent the lint from firing within patterns.
clippy_lints/src/replace_consts.rs
tests/ui/replace_consts.fixed
tests/ui/replace_consts.rs