rust/tests/ui/traits/suggest-deferences/root-obligation.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
267 B
Rust
Raw Normal View History

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