fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB39 linesraw
1error: expected one of `,`, `:`, or `>`, found `=`
2  --> $DIR/issue-34334.rs:2:29
3   |
4LL |     let sr: Vec<(u32, _, _) = vec![];
5   |         --                - ^ expected one of `,`, `:`, or `>`
6   |         |                 |
7   |         |                 maybe try to close unmatched angle bracket
8   |         while parsing the type for `sr`
9   |
10help: you might have meant to end the type parameters here
11   |
12LL |     let sr: Vec<(u32, _, _)> = vec![];
13   |                            +
14
15error[E0277]: a value of type `Vec<(u32, _, _)>` cannot be built from an iterator over elements of type `()`
16  --> $DIR/issue-34334.rs:5:87
17   |
18LL |     let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect();
19   |                                                                                       ^^^^^^^ value of type `Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator<Item=()>`
20   |
21   = help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>`
22   = help: the trait `FromIterator<(u32, _, _)>` is implemented for `Vec<(u32, _, _)>`
23   = help: for that trait implementation, expected `(u32, _, _)`, found `()`
24note: the method call chain might not have had the expected associated types
25  --> $DIR/issue-34334.rs:5:43
26   |
27LL |     let sr: Vec<(u32, _, _) = vec![];
28   |                               ------ this expression has type `Vec<(_, _, _)>`
29...
30LL |     let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect();
31   |                                    ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
32   |                                    |
33   |                                    `Iterator::Item` is `&(_, _, _)` here
34note: required by a bound in `collect`
35  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
36
37error: aborting due to 2 previous errors
38
39For more information about this error, try `rustc --explain E0277`.