summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs')
-rw-r--r--src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs
new file mode 100644
index 000000000..1d2345180
--- /dev/null
+++ b/src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs
@@ -0,0 +1,12 @@
+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`
+ //~| NOTE required by a bound introduced by this call
+ //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8`
+ //~| HELP the following other types implement trait `Pattern<'a>`:
+ //~| NOTE required because of the requirements on the impl of `Pattern<'_>` for `u8`
+
+}
+
+fn main() {}