2022-03-26 21:26:02 +00:00
|
|
|
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`
|
2022-03-27 01:49:01 +00:00
|
|
|
//~| HELP the following other types implement trait `Pattern<'a>`:
|
2022-08-15 21:31:37 +01:00
|
|
|
//~| NOTE required for `u8` to implement `Pattern<'_>`
|
2022-03-26 21:26:02 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|