]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/issue-36053-2.stderr
3f87ef74b8ea396614b849e605af231ee9576db0
[rust.git] / src / test / ui / mismatched_types / issue-36053-2.stderr
1 error[E0599]: no method named `count` found for type `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope
2   --> $DIR/issue-36053-2.rs:7:55
3    |
4 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
5    |                                                       ^^^^^
6    |
7    = note: the method `count` exists but the following trait bounds were not satisfied:
8            `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]> : std::iter::Iterator`
9            `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]> : std::iter::Iterator`
10
11 error[E0631]: type mismatch in closure arguments
12   --> $DIR/issue-36053-2.rs:7:32
13    |
14 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
15    |                                ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _`
16    |                                |
17    |                                expected signature of `for<'r> fn(&'r &str) -> _`
18
19 error[E0631]: type mismatch in closure arguments
20   --> $DIR/issue-36053-2.rs:7:32
21    |
22 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
23    |                                ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _`
24    |                                |
25    |                                expected signature of `fn(&&str) -> _`
26
27 error: aborting due to 3 previous errors
28
29 For more information about this error, try `rustc --explain E0599`.