]>
Commit | Line | Data |
---|---|---|
e1599b0c | 1 | error[E0416]: identifier `a` is bound more than once in the same pattern |
cdc7bbd5 | 2 | --> $DIR/already-bound-name.rs:9:13 |
e1599b0c XL |
3 | | |
4 | LL | let (a, a) = (0, 1); // Standard duplication without an or-pattern. | |
5 | | ^ used in a pattern more than once | |
6 | ||
7 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 8 | --> $DIR/already-bound-name.rs:12:15 |
e1599b0c XL |
9 | | |
10 | LL | let (a, A(a, _) | B(a)) = (0, A(1, 2)); | |
11 | | ^ used in a pattern more than once | |
12 | ||
13 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 14 | --> $DIR/already-bound-name.rs:12:25 |
e1599b0c XL |
15 | | |
16 | LL | let (a, A(a, _) | B(a)) = (0, A(1, 2)); | |
17 | | ^ used in a pattern more than once | |
18 | ||
19 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 20 | --> $DIR/already-bound-name.rs:16:26 |
e1599b0c XL |
21 | | |
22 | LL | let (A(a, _) | B(a), a) = (A(0, 1), 2); | |
23 | | ^ used in a pattern more than once | |
24 | ||
25 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 26 | --> $DIR/already-bound-name.rs:19:15 |
e1599b0c | 27 | | |
6a06907d XL |
28 | LL | let (A(a, a) | B(a)) = A(0, 1); |
29 | | ^ used in a pattern more than once | |
e1599b0c XL |
30 | |
31 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 32 | --> $DIR/already-bound-name.rs:22:22 |
e1599b0c | 33 | | |
6a06907d XL |
34 | LL | let (B(a) | A(a, a)) = A(0, 1); |
35 | | ^ used in a pattern more than once | |
e1599b0c XL |
36 | |
37 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 38 | --> $DIR/already-bound-name.rs:26:21 |
e1599b0c XL |
39 | | |
40 | LL | B(a) | A(a, a) => {} // Let's ensure `match` has no funny business. | |
41 | | ^ used in a pattern more than once | |
42 | ||
43 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 44 | --> $DIR/already-bound-name.rs:30:37 |
e1599b0c | 45 | | |
6a06907d XL |
46 | LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1)); |
47 | | ^ used in a pattern more than once | |
e1599b0c XL |
48 | |
49 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 50 | --> $DIR/already-bound-name.rs:30:47 |
e1599b0c | 51 | | |
6a06907d XL |
52 | LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1)); |
53 | | ^ used in a pattern more than once | |
e1599b0c XL |
54 | |
55 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 56 | --> $DIR/already-bound-name.rs:35:37 |
e1599b0c | 57 | | |
6a06907d XL |
58 | LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1)); |
59 | | ^ used in a pattern more than once | |
e1599b0c XL |
60 | |
61 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 62 | --> $DIR/already-bound-name.rs:35:47 |
e1599b0c | 63 | | |
6a06907d XL |
64 | LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1)); |
65 | | ^ used in a pattern more than once | |
e1599b0c XL |
66 | |
67 | error[E0408]: variable `a` is not bound in all patterns | |
cdc7bbd5 | 68 | --> $DIR/already-bound-name.rs:35:10 |
e1599b0c | 69 | | |
6a06907d XL |
70 | LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1)); |
71 | | ^^^^ pattern doesn't bind `a` - variable not in all patterns | |
e1599b0c XL |
72 | |
73 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 74 | --> $DIR/already-bound-name.rs:40:50 |
e1599b0c | 75 | | |
6a06907d XL |
76 | LL | let (B(A(a, _) | B(a)) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1)); |
77 | | ^ used in a pattern more than once | |
e1599b0c XL |
78 | |
79 | error[E0416]: identifier `a` is bound more than once in the same pattern | |
cdc7bbd5 | 80 | --> $DIR/already-bound-name.rs:40:60 |
e1599b0c | 81 | | |
6a06907d XL |
82 | LL | let (B(A(a, _) | B(a)) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1)); |
83 | | ^ used in a pattern more than once | |
e1599b0c | 84 | |
e1599b0c | 85 | error[E0308]: mismatched types |
cdc7bbd5 | 86 | --> $DIR/already-bound-name.rs:30:32 |
e1599b0c | 87 | | |
6a06907d | 88 | LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1)); |
5e7ed085 FG |
89 | | - ^ ------- this expression has type `E<E<{integer}>>` |
90 | | | | | |
91 | | | expected integer, found enum `E` | |
6a06907d | 92 | | first introduced with type `{integer}` here |
e1599b0c XL |
93 | | |
94 | = note: expected type `{integer}` | |
04454e1e | 95 | found enum `E<{integer}>` |
74b04a01 | 96 | = note: a binding must have the same type in all alternatives |
e1599b0c XL |
97 | |
98 | error: aborting due to 15 previous errors | |
99 | ||
100 | Some errors have detailed explanations: E0308, E0408, E0416. | |
101 | For more information about an error, try `rustc --explain E0308`. |