1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/issue-36053-2.rs:7:32
4 LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
7 | | | help: consider borrowing the argument: `&&str`
8 | | found signature defined here
11 = note: expected closure signature `for<'a> fn(&'a &str) -> _`
12 found closure signature `for<'a> fn(&'a str) -> _`
13 note: required by a bound in `filter`
14 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
16 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
17 --> $DIR/issue-36053-2.rs:7:55
19 LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
20 | --------- ^^^^^ method cannot be called due to unsatisfied trait bounds
22 | doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool`
23 | doesn't satisfy `_: FnMut<(&&str,)>`
24 --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
26 = note: doesn't satisfy `_: Iterator`
28 = note: the following trait bounds were not satisfied:
29 `<[closure@$DIR/issue-36053-2.rs:7:39: 7:48] as FnOnce<(&&str,)>>::Output = bool`
30 which is required by `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>: Iterator`
31 `[closure@$DIR/issue-36053-2.rs:7:39: 7:48]: FnMut<(&&str,)>`
32 which is required by `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>: Iterator`
33 `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>: Iterator`
34 which is required by `&mut Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>: Iterator`
36 error: aborting due to 2 previous errors
38 Some errors have detailed explanations: E0599, E0631.
39 For more information about an error, try `rustc --explain E0599`.