summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-104961.fixed
blob: 36917cf33954843f4585d1fb81fac09d75a40f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-rustfix

fn foo(x: &str) -> bool {
    x.starts_with(&("hi".to_string() + " you"))
    //~^ ERROR expected a `FnMut(char)` closure, found `String`
}

fn foo2(x: &str) -> bool {
    x.starts_with(&"hi".to_string())
    //~^ ERROR expected a `FnMut(char)` closure, found `String`
}

fn main() {
    foo("hi you");
    foo2("hi");
}