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