]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / traits / bound / assoc-fn-bound-root-obligation.rs
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<'_>`
8
9 }
10
11 fn main() {}