1error[E0631]: type mismatch in closure arguments 2 --> $DIR/issue-36053-2.rs:7:32 3 | 4LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); 5 | ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _` 6 | | 7 | expected signature of `for<'r> fn(&'r &str) -> _` 8 | 9note: required by a bound in `filter` 10 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL 11 | 12LL | P: FnMut(&Self::Item) -> bool, 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `filter` 14 15error[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 16 --> $DIR/issue-36053-2.rs:7:55 17 | 18LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); 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 | | 21 | doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool` 22 | doesn't satisfy `_: FnMut<(&&str,)>` 23 | 24 ::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL 25 | 26LL | pub struct Filter<I, P> { 27 | ----------------------- doesn't satisfy `_: Iterator` 28 | 29 = note: the following trait bounds were not satisfied: 30 `<[closure@$DIR/issue-36053-2.rs:7:39: 7:53] as FnOnce<(&&str,)>>::Output = bool` 31 which is required by `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` 32 `[closure@$DIR/issue-36053-2.rs:7:39: 7:53]: FnMut<(&&str,)>` 33 which is required by `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` 34 `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` 35 which is required by `&mut Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` 36 37error: aborting due to 2 previous errors 38 39Some errors have detailed explanations: E0599, E0631. 40For more information about an error, try `rustc --explain E0599`. 41