@@ -2,37 +2,85 @@ error: unexpected `,` in pattern
2
2
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:38:17
3
3
|
4
4
LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") {
5
- | --^------- help: try adding parentheses: `(b1, b2, b3)`
5
+ | ^
6
+ help: try adding parentheses to match on a tuple..
7
+ |
8
+ LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") {
9
+ | ^^^^^^^^^^^^
10
+ help: ..or a vertical bar to match on multiple alternatives
11
+ |
12
+ LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") {
13
+ | ^^^^^^^^^^^^
6
14
7
15
error: unexpected `,` in pattern
8
16
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:49:14
9
17
|
10
18
LL | if let b1, b2, b3 = reading_frame.next().unwrap() {
11
- | --^------- help: try adding parentheses: `(b1, b2, b3)`
19
+ | ^
20
+ help: try adding parentheses to match on a tuple..
21
+ |
22
+ LL | if let (b1, b2, b3) = reading_frame.next().unwrap() {
23
+ | ^^^^^^^^^^^^
24
+ help: ..or a vertical bar to match on multiple alternatives
25
+ |
26
+ LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() {
27
+ | ^^^^^^^^^^^^
12
28
13
29
error: unexpected `,` in pattern
14
30
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:59:28
15
31
|
16
32
LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
17
- | -------------------^------------------------ help: try adding parentheses: `(Nucleotide::Adenine, Nucleotide::Cytosine, _)`
33
+ | ^
34
+ help: try adding parentheses to match on a tuple..
35
+ |
36
+ LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
+ help: ..or a vertical bar to match on multiple alternatives
39
+ |
40
+ LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
41
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
42
19
43
error: unexpected `,` in pattern
20
44
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:67:10
21
45
|
22
46
LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
23
- | -^----------- help: try adding parentheses: `(x, _barr_body)`
47
+ | ^
48
+ help: try adding parentheses to match on a tuple..
49
+ |
50
+ LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
51
+ | ^^^^^^^^^^^^^^^
52
+ help: ..or a vertical bar to match on multiple alternatives
53
+ |
54
+ LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
55
+ | ^^^^^^^^^^^^^^
24
56
25
57
error: unexpected `,` in pattern
26
58
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:75:10
27
59
|
28
60
LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
29
- | -^------------------- help: try adding parentheses: `(x, y @ Allosome::Y(_))`
61
+ | ^
62
+ help: try adding parentheses to match on a tuple..
63
+ |
64
+ LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
65
+ | ^^^^^^^^^^^^^^^^^^^^^^^
66
+ help: ..or a vertical bar to match on multiple alternatives
67
+ |
68
+ LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
69
+ | ^^^^^^^^^^^^^^^^^^^^^^
30
70
31
71
error: unexpected `,` in pattern
32
72
--> $DIR/issue-48492-tuple-destructure-missing-parens.rs:84:14
33
73
|
34
74
LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
35
- | -----^---- help: try adding parentheses: `(women, men)`
75
+ | ^
76
+ help: try adding parentheses to match on a tuple..
77
+ |
78
+ LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
79
+ | ^^^^^^^^^^^^
80
+ help: ..or a vertical bar to match on multiple alternatives
81
+ |
82
+ LL | let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
83
+ | ^^^^^^^^^^^
36
84
37
85
error: aborting due to 6 previous errors
38
86
0 commit comments