2019-08-24 21:39:28 -05:00
|
|
|
error: an or-pattern parameter must be wrapped in parenthesis
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:27:13
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
2019-08-24 21:39:28 -05:00
|
|
|
LL | fn fun1(A | B: E) {}
|
|
|
|
| ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
|
|
|
|
|
|
|
|
error: a leading `|` is not allowed in a parameter pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:29:13
|
2019-08-24 21:39:28 -05:00
|
|
|
|
|
|
|
|
LL | fn fun2(| A | B: E) {}
|
|
|
|
| ^ help: remove the `|`
|
|
|
|
|
|
|
|
error: an or-pattern parameter must be wrapped in parenthesis
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:29:15
|
2019-08-24 21:39:28 -05:00
|
|
|
|
|
|
|
|
LL | fn fun2(| A | B: E) {}
|
|
|
|
| ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:40:11
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
LL | let ( | A | B) = E::A;
|
|
|
|
| ^ help: remove the `|`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:41:11
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
LL | let ( | A | B,) = (E::B,);
|
|
|
|
| ^ help: remove the `|`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:42:11
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
LL | let [ | A | B ] = [E::A];
|
|
|
|
| ^ help: remove the `|`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:43:13
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
|
LL | let TS( | A | B );
|
2019-08-18 19:40:24 -05:00
|
|
|
| ^ help: remove the `|`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:44:17
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
|
LL | let NS { f: | A | B };
|
2019-08-18 19:40:24 -05:00
|
|
|
| ^ help: remove the `|`
|
|
|
|
|
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:46:11
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
|
LL | let ( || A | B) = E::A;
|
|
|
|
| ^^ help: remove the `||`
|
2019-09-28 23:21:20 -05:00
|
|
|
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:47:11
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
|
LL | let [ || A | B ] = [E::A];
|
|
|
|
| ^^ help: remove the `||`
|
2019-09-28 23:21:20 -05:00
|
|
|
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:48:13
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
|
LL | let TS( || A | B );
|
|
|
|
| ^^ help: remove the `||`
|
2019-09-28 23:21:20 -05:00
|
|
|
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
error: a leading `|` is only allowed in a top-level pattern
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:49:17
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
|
LL | let NS { f: || A | B };
|
|
|
|
| ^^ help: remove the `||`
|
2019-09-28 23:21:20 -05:00
|
|
|
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
error: no rules expected the token `|`
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:13:15
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
|
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 `|`
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:14:13
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
|
LL | macro_rules! accept_pat {
|
|
|
|
| ----------------------- when calling this macro
|
|
|
|
...
|
|
|
|
LL | accept_pat!(| p | q);
|
|
|
|
| ^ no rules expected this token in macro call
|
|
|
|
|
2019-12-10 15:03:13 -06:00
|
|
|
error[E0369]: no implementation for `E | ()`
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:23:22
|
2019-08-18 16:53:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = |A | B: E| ();
|
|
|
|
| ----^ -- ()
|
|
|
|
| |
|
|
|
|
| E
|
|
|
|
|
|
|
|
|
= note: an implementation of `std::ops::BitOr` might be missing for `E`
|
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-12-27 06:03:03 -06:00
|
|
|
--> $DIR/or-patterns-syntactic-fail.rs:51:36
|
2019-08-18 19:40:24 -05:00
|
|
|
|
|
|
|
|
LL | let recovery_witness: String = 0;
|
2019-11-18 23:00:24 -06:00
|
|
|
| ------ ^
|
|
|
|
| | |
|
2020-09-02 02:40:56 -05:00
|
|
|
| | expected struct `String`, found integer
|
2019-11-18 23:00:24 -06:00
|
|
|
| | help: try using a conversion method: `0.to_string()`
|
|
|
|
| expected due to this
|
2019-08-18 19:40:24 -05:00
|
|
|
|
2019-08-24 21:39:28 -05:00
|
|
|
error: aborting due to 16 previous errors
|
2019-08-18 16:53:08 -05:00
|
|
|
|
2019-08-18 19:40:24 -05:00
|
|
|
Some errors have detailed explanations: E0308, E0369.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|