blob: 989aeb520064568c4951bb7e93221137c29c6d37 (
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
102
103
104
|
error: an or-pattern parameter must be wrapped in parenthesis
--> $DIR/or-patterns-syntactic-fail.rs:17:13
|
LL | fn fun1(A | B: E) {}
| ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
error: a leading `|` is not allowed in a parameter pattern
--> $DIR/or-patterns-syntactic-fail.rs:19:13
|
LL | fn fun2(| A | B: E) {}
| ^ help: remove the `|`
error: an or-pattern parameter must be wrapped in parenthesis
--> $DIR/or-patterns-syntactic-fail.rs:19:15
|
LL | fn fun2(| A | B: E) {}
| ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:30:11
|
LL | let ( | A | B) = E::A;
| ^ help: remove the `|`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:31:11
|
LL | let ( | A | B,) = (E::B,);
| ^ help: remove the `|`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:32:11
|
LL | let [ | A | B ] = [E::A];
| ^ help: remove the `|`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:33:13
|
LL | let TS( | A | B );
| ^ help: remove the `|`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:34:17
|
LL | let NS { f: | A | B };
| ^ help: remove the `|`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:36:11
|
LL | let ( || A | B) = E::A;
| ^^ help: remove the `||`
|
= note: alternatives in or-patterns are separated with `|`, not `||`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:37:11
|
LL | let [ || A | B ] = [E::A];
| ^^ help: remove the `||`
|
= note: alternatives in or-patterns are separated with `|`, not `||`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:38:13
|
LL | let TS( || A | B );
| ^^ help: remove the `||`
|
= note: alternatives in or-patterns are separated with `|`, not `||`
error: a leading `|` is only allowed in a top-level pattern
--> $DIR/or-patterns-syntactic-fail.rs:39:17
|
LL | let NS { f: || A | B };
| ^^ help: remove the `||`
|
= note: alternatives in or-patterns are separated with `|`, not `||`
error[E0369]: no implementation for `E | ()`
--> $DIR/or-patterns-syntactic-fail.rs:13:22
|
LL | let _ = |A | B: E| ();
| ----^ -- ()
| |
| E
|
= note: an implementation of `std::ops::BitOr` might be missing for `E`
error[E0308]: mismatched types
--> $DIR/or-patterns-syntactic-fail.rs:41:36
|
LL | let recovery_witness: String = 0;
| ------ ^
| | |
| | expected struct `String`, found integer
| | help: try using a conversion method: `0.to_string()`
| expected due to this
error: aborting due to 14 previous errors
Some errors have detailed explanations: E0308, E0369.
For more information about an error, try `rustc --explain E0308`.
|