summaryrefslogtreecommitdiffstats
path: root/tests/ui/mismatched_types/issue-36053-2.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/mismatched_types/issue-36053-2.stderr (renamed from src/test/ui/mismatched_types/issue-36053-2.stderr)15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/tests/ui/mismatched_types/issue-36053-2.stderr
index 906001ca1..a6764a1dc 100644
--- a/src/test/ui/mismatched_types/issue-36053-2.stderr
+++ b/tests/ui/mismatched_types/issue-36053-2.stderr
@@ -10,23 +10,22 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
found closure signature `for<'a> fn(&'a str) -> _`
note: required by a bound in `filter`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider borrowing the argument
|
-LL | P: FnMut(&Self::Item) -> bool,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `filter`
+LL | once::<&str>("str").fuse().filter(|a: &&str| true).count();
+ | +
-error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>`, but its trait bounds were not satisfied
+error[E0599]: the method `count` exists for struct `Filter<Fuse<Once<&str>>, [closure@issue-36053-2.rs:7:39]>`, but its trait bounds were not satisfied
--> $DIR/issue-36053-2.rs:7:55
|
LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
- | --------- ^^^^^ method cannot be called on `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>` due to unsatisfied trait bounds
+ | --------- ^^^^^ method cannot be called due to unsatisfied trait bounds
| |
| doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool`
| doesn't satisfy `_: FnMut<(&&str,)>`
+ --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
|
- ::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
- |
-LL | pub struct Filter<I, P> {
- | ----------------------- doesn't satisfy `_: Iterator`
+ = note: doesn't satisfy `_: Iterator`
|
= note: the following trait bounds were not satisfied:
`<[closure@$DIR/issue-36053-2.rs:7:39: 7:48] as FnOnce<(&&str,)>>::Output = bool`