]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31173.stderr
Fix UI tests
[rust.git] / src / test / ui / issues / issue-31173.stderr
1 error[E0271]: type mismatch resolving `<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]> as Iterator>::Item == &_`
2   --> $DIR/issue-31173.rs:10:10
3    |
4 LL |         .cloned()
5    |          ^^^^^^ expected `u8`, found reference
6    |
7    = note:   expected type `u8`
8            found reference `&_`
9
10 error[E0599]: no method named `collect` found for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>` in the current scope
11   --> $DIR/issue-31173.rs:14:10
12    |
13 LL |         .collect();
14    |          ^^^^^^^ method not found in `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>`
15    | 
16   ::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
17    |
18 LL | pub struct Cloned<I> {
19    | -------------------- doesn't satisfy `_: Iterator`
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    = note: the method `collect` exists but the following trait bounds were not satisfied:
27            `<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]> as Iterator>::Item = &_`
28            which is required by `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
29            `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
30            which is required by `&mut Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
31
32 error: aborting due to 2 previous errors
33
34 Some errors have detailed explanations: E0271, E0599.
35 For more information about an error, try `rustc --explain E0271`.