summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs
blob: 1d234518056fd309e8650f8e0ee568381887e604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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`
    //~| NOTE required by a bound introduced by this call
    //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8`
    //~| HELP the following other types implement trait `Pattern<'a>`:
    //~| NOTE required because of the requirements on the impl of `Pattern<'_>` for `u8`

}

fn main() {}