You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #94870 - notriddle:notriddle/filter-regression, r=oli-obk
diagnostics: do not spurriously claim something is "not an iterator"
Fixes a minor regression caused by #94746, where `iter::Filter` is spurriously declared "not an iterator."
Copy file name to clipboardExpand all lines: src/test/ui/mismatched_types/issue-36053-2.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ note: required by a bound in `filter`
12
12
LL | P: FnMut(&Self::Item) -> bool,
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `filter`
14
14
15
-
error[E0599]: `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` is not an iterator
15
+
error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>`, but its trait bounds were not satisfied
| -------------- ^^^^^ `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` is not an iterator
19
+
| -------------- ^^^^^ method cannot be called on `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` due to unsatisfied trait bounds
20
20
| |
21
21
| doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool`
0 commit comments