summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/suggest-deferences/root-obligation.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/traits/suggest-deferences/root-obligation.stderr')
-rw-r--r--src/test/ui/traits/suggest-deferences/root-obligation.stderr24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/traits/suggest-deferences/root-obligation.stderr b/src/test/ui/traits/suggest-deferences/root-obligation.stderr
new file mode 100644
index 000000000..16e03e79c
--- /dev/null
+++ b/src/test/ui/traits/suggest-deferences/root-obligation.stderr
@@ -0,0 +1,24 @@
+error[E0277]: expected a `Fn<(char,)>` closure, found `char`
+ --> $DIR/root-obligation.rs:6:38
+ |
+LL | .filter(|c| "aeiou".contains(c))
+ | -------- ^ expected an `Fn<(char,)>` closure, found `char`
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Fn<(char,)>` is not implemented for `char`
+ = note: required because of the requirements on the impl of `FnOnce<(char,)>` for `&char`
+ = note: required because of the requirements on the impl of `Pattern<'_>` for `&char`
+note: required by a bound in `core::str::<impl str>::contains`
+ --> $SRC_DIR/core/src/str/mod.rs:LL:COL
+ |
+LL | pub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool {
+ | ^^^^^^^^^^^ required by this bound in `core::str::<impl str>::contains`
+help: consider dereferencing here
+ |
+LL | .filter(|c| "aeiou".contains(*c))
+ | +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.