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