summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
blob: f9a9347641143f891ad74b8421914c9e83781058 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn strip_lf(s: &str) -> &str {
    s.strip_suffix(b'\n').unwrap_or(s)
    //~^ ERROR expected a `FnMut<(char,)>` closure, found `u8`
    //~| NOTE expected an `FnMut<(char,)>` closure, found `u8`
    //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8`
    //~| HELP the following other types implement trait `Pattern<'a>`:
    //~| NOTE required for `u8` to implement `Pattern<'_>`

}

fn main() {}