]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31173.stderr
Auto merge of #105612 - oli-obk:bind_rustdoc, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-31173.stderr
1 error[E0271]: expected `TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>` to be an iterator that yields `&_`, but it yields `u8`
2   --> $DIR/issue-31173.rs:11:10
3    |
4 LL |         .cloned()
5    |          ^^^^^^ expected reference, found `u8`
6    |
7    = note: expected reference `&_`
8                    found type `u8`
9 note: required by a bound in `cloned`
10   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
11    |
12 LL |         Self: Sized + Iterator<Item = &'a T>,
13    |                                ^^^^^^^^^^^^ required by this bound in `Iterator::cloned`
14
15 error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>`, but its trait bounds were not satisfied
16   --> $DIR/issue-31173.rs:12:10
17    |
18 LL |         .collect();
19    |          ^^^^^^^ method cannot be called on `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>` due to unsatisfied trait bounds
20    |
21   ::: $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL
22    |
23 LL | pub struct TakeWhile<I, P> {
24    | -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_`
25    |
26   ::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
27    |
28 LL | pub struct Cloned<I> {
29    | -------------------- doesn't satisfy `_: Iterator`
30    |
31    = note: the following trait bounds were not satisfied:
32            `<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]> as Iterator>::Item = &_`
33            which is required by `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>: Iterator`
34            `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>: Iterator`
35            which is required by `&mut Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>: Iterator`
36
37 error: aborting due to 2 previous errors
38
39 Some errors have detailed explanations: E0271, E0599.
40 For more information about an error, try `rustc --explain E0271`.