| error: an or-pattern parameter must be wrapped in parenthesis |
| --> $DIR/or-patterns-syntactic-fail.rs:28: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:30: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:30: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:41: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:42: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:43: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:44: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:45: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:47: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:48: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:49: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:50:17 |
| | |
| LL | let NS { f: || A | B }; |
| | ^^ help: remove the `||` |
| | |
| = note: alternatives in or-patterns are separated with `|`, not `||` |
| |
| error: no rules expected the token `|` |
| --> $DIR/or-patterns-syntactic-fail.rs:14:15 |
| | |
| LL | macro_rules! accept_pat { |
| | ----------------------- when calling this macro |
| ... |
| LL | accept_pat!(p | q); |
| | ^ no rules expected this token in macro call |
| |
| error: no rules expected the token `|` |
| --> $DIR/or-patterns-syntactic-fail.rs:15:13 |
| | |
| LL | macro_rules! accept_pat { |
| | ----------------------- when calling this macro |
| ... |
| LL | accept_pat!(| p | q); |
| | ^ no rules expected this token in macro call |
| |
| warning: the feature `or_patterns` is incomplete and may cause the compiler to crash |
| --> $DIR/or-patterns-syntactic-fail.rs:4:12 |
| | |
| LL | #![feature(or_patterns)] |
| | ^^^^^^^^^^^ |
| | |
| = note: `#[warn(incomplete_features)]` on by default |
| |
| error[E0369]: binary operation `|` cannot be applied to type `E` |
| --> $DIR/or-patterns-syntactic-fail.rs:24: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:52:36 |
| | |
| LL | let recovery_witness: String = 0; |
| | ------ ^ |
| | | | |
| | | expected struct `std::string::String`, found integer |
| | | help: try using a conversion method: `0.to_string()` |
| | expected due to this |
| |
| error: aborting due to 16 previous errors |
| |
| Some errors have detailed explanations: E0308, E0369. |
| For more information about an error, try `rustc --explain E0308`. |