summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs')
-rw-r--r--tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
new file mode 100644
index 000000000..f9a934764
--- /dev/null
+++ b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
@@ -0,0 +1,11 @@
+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`
+ //~| HELP the following other types implement trait `Pattern<'a>`:
+ //~| NOTE required for `u8` to implement `Pattern<'_>`
+
+}
+
+fn main() {}