mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-01 00:49:30 +00:00
782b484b79
rustc comiler internals helpfully tell us how to fix the issue: to get the signature of a closure, use `substs.as_closure().sig()` not `fn_sig()` Fixes ICE in #9041
10 lines
389 B
Text
10 lines
389 B
Text
error: called `is_some()` after searching an `Iterator` with `find`
|
|
--> $DIR/ice-9041.rs:5:19
|
|
|
|
|
LL | things.iter().find(|p| is_thing_ready(p)).is_some()
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|p| is_thing_ready(&p))`
|
|
|
|
|
= note: `-D clippy::search-is-some` implied by `-D warnings`
|
|
|
|
error: aborting due to previous error
|
|
|