1 fn strip_lf(s: &str) -> &str {
2 s.strip_suffix(b'\n').unwrap_or(s)
3 //~^ ERROR expected a `FnMut<(char,)>` closure, found `u8`
4 //~| NOTE expected an `FnMut<(char,)>` closure, found `u8`
5 //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8`
6 //~| HELP the following other types implement trait `Pattern<'a>`:
7 //~| NOTE required for `u8` to implement `Pattern<'_>`