rust/tests/ui/traits/suggest-dereferences/root-obligation.rs
2023-09-07 04:52:26 +00:00

14 lines
266 B
Rust

// 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");
}