2019-09-01 15:36:04 +00:00
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:9:13
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
LL | let (a, a) = (0, 1); // Standard duplication without an or-pattern.
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:12:15
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
LL | let (a, A(a, _) | B(a)) = (0, A(1, 2));
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:12:25
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
LL | let (a, A(a, _) | B(a)) = (0, A(1, 2));
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:16:26
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
LL | let (A(a, _) | B(a), a) = (A(0, 1), 2);
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:19:15
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (A(a, a) | B(a)) = A(0, 1);
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:22:22
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(a) | A(a, a)) = A(0, 1);
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:26:21
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
LL | B(a) | A(a, a) => {} // Let's ensure `match` has no funny business.
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:30:37
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:30:47
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:35:37
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:35:47
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
2019-09-01 20:52:02 +00:00
|
|
|
error[E0408]: variable `a` is not bound in all patterns
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:35:10
|
2019-09-01 20:52:02 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(_) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^^^^ pattern doesn't bind `a` - variable not in all patterns
|
2019-09-01 20:52:02 +00:00
|
|
|
|
2019-09-01 15:36:04 +00:00
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:40:50
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(A(a, _) | B(a)) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:40:60
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(A(a, _) | B(a)) | A(A(a, _) | B(a), A(a, _) | B(a))) = B(B(1));
|
|
|
|
| ^ used in a pattern more than once
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-11-21 22:05:17 +00:00
|
|
|
--> $DIR/already-bound-name.rs:30:32
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
2021-02-13 00:04:37 +00:00
|
|
|
LL | let (B(A(a, _) | B(a)) | A(a, A(a, _) | B(a))) = B(B(1));
|
2021-12-15 23:16:21 +00:00
|
|
|
| - ^ ------- this expression has type `E<E<{integer}>>`
|
|
|
|
| | |
|
2023-01-03 02:00:33 +00:00
|
|
|
| | expected integer, found `E<{integer}>`
|
2021-02-13 00:04:37 +00:00
|
|
|
| first introduced with type `{integer}` here
|
2019-09-01 15:36:04 +00:00
|
|
|
|
|
|
|
|
= note: expected type `{integer}`
|
2022-04-17 19:00:32 +00:00
|
|
|
found enum `E<{integer}>`
|
2020-02-25 04:30:43 +00:00
|
|
|
= note: a binding must have the same type in all alternatives
|
2019-09-01 15:36:04 +00:00
|
|
|
|
2019-09-01 20:52:02 +00:00
|
|
|
error: aborting due to 15 previous errors
|
2019-09-01 15:36:04 +00:00
|
|
|
|
2019-09-01 20:52:02 +00:00
|
|
|
Some errors have detailed explanations: E0308, E0408, E0416.
|
2019-09-01 15:36:04 +00:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|