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