summary refs log tree commit diff
path: root/src/test/ui/or-patterns/already-bound-name.stderr
blob: 97933ca12294400a83a5a697be987a29af544d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:11:13
   |
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
  --> $DIR/already-bound-name.rs:14:15
   |
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
  --> $DIR/already-bound-name.rs:14:25
   |
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
  --> $DIR/already-bound-name.rs:18:26
   |
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
  --> $DIR/already-bound-name.rs:21:14
   |
LL |     let A(a, a) | B(a) = A(0, 1);
   |              ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:24:21
   |
LL |     let B(a) | A(a, a) = A(0, 1);
   |                     ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:28:21
   |
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
  --> $DIR/already-bound-name.rs:32:36
   |
LL |     let B(A(a, _) | B(a)) | A(a, A(a, _) | B(a)) = B(B(1));
   |                                    ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:32:46
   |
LL |     let B(A(a, _) | B(a)) | A(a, A(a, _) | B(a)) = B(B(1));
   |                                              ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:37:36
   |
LL |     let B(_) | A(A(a, _) | B(a), A(a, _) | B(a)) = B(B(1));
   |                                    ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:37:46
   |
LL |     let B(_) | A(A(a, _) | B(a), A(a, _) | B(a)) = B(B(1));
   |                                              ^ used in a pattern more than once

error[E0408]: variable `a` is not bound in all patterns
  --> $DIR/already-bound-name.rs:37:9
   |
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

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:42:49
   |
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

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/already-bound-name.rs:42:59
   |
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

error[E0308]: mismatched types
  --> $DIR/already-bound-name.rs:32:31
   |
LL |     let B(A(a, _) | B(a)) | A(a, A(a, _) | B(a)) = B(B(1));
   |             -                 ^                    ------- this expression has type `E<E<{integer}>>`
   |             |                 |
   |             |                 expected integer, found enum `E`
   |             first introduced with type `{integer}` here
   |
   = note: expected type `{integer}`
              found type `E<{integer}>`
   = note: a binding must have the same type in all alternatives

error: aborting due to 15 previous errors

Some errors have detailed explanations: E0308, E0408, E0416.
For more information about an error, try `rustc --explain E0308`.