about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/enum-tuple.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-23 14:23:08 +0000
committerbors <bors@rust-lang.org>2022-10-23 14:23:08 +0000
commitb97d29acb714213c1331ff846e043584d42ca864 (patch)
tree427a1485f9e1c05b9313956075b43bfa91a644f2 /src/test/rustdoc-ui/coverage/enum-tuple.rs
parent3f4287ceae07513dc4125f567c536f7d5d5308a8 (diff)
parenta41cb7adbeaa1dae9cf5f371bc02061c63caaf81 (diff)
downloadrust-b97d29acb714213c1331ff846e043584d42ca864.tar.gz
rust-b97d29acb714213c1331ff846e043584d42ca864.zip
Auto merge of #9689 - koka831:fix/or_fun_call_map_or, r=flip1995
fix: support `map_or` for `or_fun_call` lint

fixes https://github.com/rust-lang/rust-clippy/issues/8993

The methods defined in `KNOW_TYPES`, except for `map_or`, accepts only one argument, so the matching `if let [arg] = args` works only for these methods.
This PR adds `rest_arg` argument to `check_general_case` method and handling of cases with two arguments to support `map_or`.

changelog: `or_fun_call` support `map_or`

* add `rest_arg` to pass second argument from `map_or(U, F)`
* extract some procedures into closure
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions