]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/issue-36053-2.stderr
Number of filtered out tests in tests summary
[rust.git] / src / test / ui / mismatched_types / issue-36053-2.stderr
1 error: no method named `count` found for type `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]>` in the current scope
2   --> $DIR/issue-36053-2.rs:17:55
3    |
4 17 |     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: `[closure@$DIR/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`, `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
8
9 error[E0281]: type mismatch: `[closure@$DIR/issue-36053-2.rs:17:39: 17:53]` implements the trait `for<'r> std::ops::FnMut<(&'r str,)>`, but the trait `for<'r> std::ops::FnMut<(&'r &str,)>` is required
10   --> $DIR/issue-36053-2.rs:17:32
11    |
12 17 |     once::<&str>("str").fuse().filter(|a: &str| true).count();
13    |                                ^^^^^^ -------------- implements `for<'r> std::ops::FnMut<(&'r str,)>`
14    |                                |
15    |                                requires `for<'r> std::ops::FnMut<(&'r &str,)>`
16    |                                expected &str, found str
17
18 error[E0281]: type mismatch: `[closure@$DIR/issue-36053-2.rs:17:39: 17:53]` implements the trait `for<'r> std::ops::FnOnce<(&'r str,)>`, but the trait `for<'r> std::ops::FnOnce<(&'r &str,)>` is required
19   --> $DIR/issue-36053-2.rs:17:32
20    |
21 17 |     once::<&str>("str").fuse().filter(|a: &str| true).count();
22    |                                ^^^^^^ -------------- implements `for<'r> std::ops::FnOnce<(&'r str,)>`
23    |                                |
24    |                                requires `for<'r> std::ops::FnOnce<(&'r &str,)>`
25    |                                expected &str, found str
26
27 error: aborting due to 3 previous errors
28