summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-104961.rs
blob: aeb787abb6fc8779515121fd297f747198869cc4 (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");
}