]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/issue-36053-2.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / issue-36053-2.stderr
1 error[E0599]: no method named `count` found for struct `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 | -------------- ^^^^^ method not found in `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>`
6 | |
7 | doesn't satisfy `<_ as std::ops::FnOnce<(&&str,)>>::Output = bool`
8 | doesn't satisfy `_: std::ops::FnMut<(&&str,)>`
9 |
10 ::: $SRC_DIR/libcore/iter/adapters/mod.rs:LL:COL
11 |
12 LL | pub struct Filter<I, P> {
13 | ----------------------- doesn't satisfy `_: std::iter::Iterator`
14 |
15 = note: the method `count` exists but the following trait bounds were not satisfied:
16 `<[closure@$DIR/issue-36053-2.rs:7:39: 7:53] as std::ops::FnOnce<(&&str,)>>::Output = bool`
17 which is required by `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator`
18 `[closure@$DIR/issue-36053-2.rs:7:39: 7:53]: std::ops::FnMut<(&&str,)>`
19 which is required by `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator`
20 `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator`
21 which is required by `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator`
22
23 error[E0631]: type mismatch in closure arguments
24 --> $DIR/issue-36053-2.rs:7:32
25 |
26 LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
27 | ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _`
28 | |
29 | expected signature of `for<'r> fn(&'r &str) -> _`
30
31 error: aborting due to 2 previous errors
32
33 Some errors have detailed explanations: E0599, E0631.
34 For more information about an error, try `rustc --explain E0599`.