summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/suggest-dereferences/root-obligation.rs
blob: 51bac2107e3b4cacc74afdfa1c0ad0af3030e124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-rustfix

fn get_vowel_count(string: &str) -> usize {
    string
        .chars()
        .filter(|c| "aeiou".contains(c))
        //~^ ERROR expected a `Fn<(char,)>` closure, found `char`
        .count()
}

fn main() {
    let _ = get_vowel_count("asdf");
}