summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-9041.rs
blob: 727d88f7fbd2618832c72e412822cf80768098e3 (plain)
1
2
3
4
5
6
7
8
9
10
pub struct Thing;
//@no-rustfix
pub fn has_thing(things: &[Thing]) -> bool {
    let is_thing_ready = |_peer: &Thing| -> bool { todo!() };
    things.iter().find(|p| is_thing_ready(p)).is_some()
    //~^ ERROR: called `is_some()` after searching an `Iterator` with `find`
    //~| NOTE: `-D clippy::search-is-some` implied by `-D warnings`
}

fn main() {}