]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31173.stderr
pretty.rs: Update Closure and Generator print
[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/mod.rs:LL:COL
17    |
18 LL | pub struct Cloned<I> {
19    | -------------------- doesn't satisfy `_: Iterator`
20 ...
21 LL | pub struct TakeWhile<I, P> {
22    | -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_`
23    |
24    = note: the method `collect` exists but the following trait bounds were not satisfied:
25            `<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]> as Iterator>::Item = &_`
26            which is required by `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
27            `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
28            which is required by `&mut Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>: Iterator`
29
30 error: aborting due to 2 previous errors
31
32 Some errors have detailed explanations: E0271, E0599.
33 For more information about an error, try `rustc --explain E0271`.