rust/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
406 B
Rust
Raw Normal View History

2022-03-26 16:26:02 -05: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`
2022-03-26 16:26:02 -05:00
//~| 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<'_>`
2022-03-26 16:26:02 -05:00
}
fn main() {}