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