]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-31173.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / issues / issue-31173.stderr
CommitLineData
1b1a35ee 1error[E0271]: type mismatch resolving `<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]> as Iterator>::Item == &_`
ba9703b0 2 --> $DIR/issue-31173.rs:10:10
8faf50e0
XL
3 |
4LL | .cloned()
60c5eb7d 5 | ^^^^^^ expected `u8`, found reference
8faf50e0 6 |
60c5eb7d
XL
7 = note: expected type `u8`
8 found reference `&_`
8faf50e0 9
5869c6ff 10error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>`, but its trait bounds were not satisfied
ba9703b0 11 --> $DIR/issue-31173.rs:14:10
8faf50e0 12 |
532ac7d7 13LL | .collect();
5869c6ff 14 | ^^^^^^^ method cannot be called on `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>` due to unsatisfied trait bounds
94222f64 15 |
fc512014 16 ::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
74b04a01
XL
17 |
18LL | pub struct Cloned<I> {
1b1a35ee 19 | -------------------- doesn't satisfy `_: Iterator`
94222f64 20 |
fc512014
XL
21 ::: $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL
22 |
74b04a01 23LL | pub struct TakeWhile<I, P> {
1b1a35ee 24 | -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_`
8faf50e0 25 |
5869c6ff 26 = note: the following trait bounds were not satisfied:
1b1a35ee
XL
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`
8faf50e0
XL
31
32error: aborting due to 2 previous errors
33
48663c56 34Some errors have detailed explanations: E0271, E0599.
8faf50e0 35For more information about an error, try `rustc --explain E0271`.