1 error: an or-pattern parameter must be wrapped in parenthesis
2 --> $DIR/or-patterns-syntactic-fail.rs:17:13
4 LL | fn fun1(A | B: E) {}
5 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
7 error: a leading `|` is not allowed in a parameter pattern
8 --> $DIR/or-patterns-syntactic-fail.rs:19:13
10 LL | fn fun2(| A | B: E) {}
11 | ^ help: remove the `|`
13 error: an or-pattern parameter must be wrapped in parenthesis
14 --> $DIR/or-patterns-syntactic-fail.rs:19:15
16 LL | fn fun2(| A | B: E) {}
17 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
19 error: a leading `|` is only allowed in a top-level pattern
20 --> $DIR/or-patterns-syntactic-fail.rs:30:11
22 LL | let ( | A | B) = E::A;
23 | ^ help: remove the `|`
25 error: a leading `|` is only allowed in a top-level pattern
26 --> $DIR/or-patterns-syntactic-fail.rs:31:11
28 LL | let ( | A | B,) = (E::B,);
29 | ^ help: remove the `|`
31 error: a leading `|` is only allowed in a top-level pattern
32 --> $DIR/or-patterns-syntactic-fail.rs:32:11
34 LL | let [ | A | B ] = [E::A];
35 | ^ help: remove the `|`
37 error: a leading `|` is only allowed in a top-level pattern
38 --> $DIR/or-patterns-syntactic-fail.rs:33:13
40 LL | let TS( | A | B );
41 | ^ help: remove the `|`
43 error: a leading `|` is only allowed in a top-level pattern
44 --> $DIR/or-patterns-syntactic-fail.rs:34:17
46 LL | let NS { f: | A | B };
47 | ^ help: remove the `|`
49 error: a leading `|` is only allowed in a top-level pattern
50 --> $DIR/or-patterns-syntactic-fail.rs:36:11
52 LL | let ( || A | B) = E::A;
53 | ^^ help: remove the `||`
55 = note: alternatives in or-patterns are separated with `|`, not `||`
57 error: a leading `|` is only allowed in a top-level pattern
58 --> $DIR/or-patterns-syntactic-fail.rs:37:11
60 LL | let [ || A | B ] = [E::A];
61 | ^^ help: remove the `||`
63 = note: alternatives in or-patterns are separated with `|`, not `||`
65 error: a leading `|` is only allowed in a top-level pattern
66 --> $DIR/or-patterns-syntactic-fail.rs:38:13
68 LL | let TS( || A | B );
69 | ^^ help: remove the `||`
71 = note: alternatives in or-patterns are separated with `|`, not `||`
73 error: a leading `|` is only allowed in a top-level pattern
74 --> $DIR/or-patterns-syntactic-fail.rs:39:17
76 LL | let NS { f: || A | B };
77 | ^^ help: remove the `||`
79 = note: alternatives in or-patterns are separated with `|`, not `||`
81 error[E0369]: no implementation for `E | ()`
82 --> $DIR/or-patterns-syntactic-fail.rs:13:22
84 LL | let _ = |A | B: E| ();
89 = note: an implementation of `std::ops::BitOr` might be missing for `E`
91 error[E0308]: mismatched types
92 --> $DIR/or-patterns-syntactic-fail.rs:41:36
94 LL | let recovery_witness: String = 0;
97 | | expected struct `String`, found integer
98 | | help: try using a conversion method: `0.to_string()`
99 | expected due to this
101 error: aborting due to 14 previous errors
103 Some errors have detailed explanations: E0308, E0369.
104 For more information about an error, try `rustc --explain E0308`.