about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-24 23:19:43 +0000
committerbors <bors@rust-lang.org>2020-11-24 23:19:43 +0000
commitf897d27d8b394464048a60e5bf38d4cd1e31a5fe (patch)
tree1755ef75f7965dfb3ec1a7eeb4d1cf2753e407cf /compiler/rustc_mir/src/transform/coverage/mod.rs
parent5b40ce3f2d30280476bc30c6d9c90c3aa08e1445 (diff)
parent5a8396887714fb75f44eae2a3775b1b2a12f38ae (diff)
downloadrust-f897d27d8b394464048a60e5bf38d4cd1e31a5fe.tar.gz
rust-f897d27d8b394464048a60e5bf38d4cd1e31a5fe.zip
Auto merge of #6339 - CDirkx:redundant-pattern-match-poll, r=ebroto
Change `redundant_pattern_matching` to also lint `std::task::Poll`

`reduntant_pattern_matching` currently lints pattern matching on `Option` and `Result` where the `is_variant` utility methods could be used instead: `is_some`, `is_none`, `is_ok`, `is_err`. This PR extends this behaviour to `std::task::Poll`, suggesting the methods `is_pending` and `is_ready`.

Motivation: The current description of `redundant_pattern_matching` mentions

> It's more concise and clear to just use the proper utility function

which in my mind applies to `Poll` as well.

changelog: Enhance [`redundant_pattern_matching`] to also lint on `std::task::Poll`
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions