]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | error: top-level or-patterns are not allowed in function parameters |
fc512014 | 2 | --> $DIR/or-patterns-syntactic-fail.rs:17:13 |
e1599b0c XL |
3 | | |
4 | LL | fn fun1(A | B: E) {} | |
6a06907d | 5 | | ^^^^^ help: wrap the pattern in parentheses: `(A | B)` |
e1599b0c | 6 | |
6a06907d XL |
7 | error: top-level or-patterns are not allowed in function parameters |
8 | --> $DIR/or-patterns-syntactic-fail.rs:20:13 | |
e1599b0c XL |
9 | | |
10 | LL | fn fun2(| A | B: E) {} | |
6a06907d | 11 | | ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)` |
e1599b0c | 12 | |
6a06907d XL |
13 | error: top-level or-patterns are not allowed in `let` bindings |
14 | --> $DIR/or-patterns-syntactic-fail.rs:25:9 | |
e1599b0c | 15 | | |
6a06907d XL |
16 | LL | let A | B: E = A; |
17 | | ^^^^^ help: wrap the pattern in parentheses: `(A | B)` | |
e1599b0c | 18 | |
6a06907d XL |
19 | error: top-level or-patterns are not allowed in `let` bindings |
20 | --> $DIR/or-patterns-syntactic-fail.rs:28:9 | |
e74abb32 | 21 | | |
6a06907d XL |
22 | LL | let | A | B: E = A; |
23 | | ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)` | |
e1599b0c | 24 | |
dfeec247 | 25 | error[E0369]: no implementation for `E | ()` |
fc512014 | 26 | --> $DIR/or-patterns-syntactic-fail.rs:13:22 |
e1599b0c XL |
27 | | |
28 | LL | let _ = |A | B: E| (); | |
29 | | ----^ -- () | |
30 | | | | |
31 | | E | |
32 | | | |
33 | = note: an implementation of `std::ops::BitOr` might be missing for `E` | |
34 | ||
6a06907d | 35 | error: aborting due to 5 previous errors |
e1599b0c | 36 | |
6a06907d | 37 | For more information about this error, try `rustc --explain E0369`. |