]> git.proxmox.com Git - rustc.git/blob - src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / or-patterns / or-patterns-syntactic-fail.stderr
1 error: an or-pattern parameter must be wrapped in parenthesis
2 --> $DIR/or-patterns-syntactic-fail.rs:27:13
3 |
4 LL | fn fun1(A | B: E) {}
5 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
6
7 error: a leading `|` is not allowed in a parameter pattern
8 --> $DIR/or-patterns-syntactic-fail.rs:29:13
9 |
10 LL | fn fun2(| A | B: E) {}
11 | ^ help: remove the `|`
12
13 error: an or-pattern parameter must be wrapped in parenthesis
14 --> $DIR/or-patterns-syntactic-fail.rs:29:15
15 |
16 LL | fn fun2(| A | B: E) {}
17 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)`
18
19 error: a leading `|` is only allowed in a top-level pattern
20 --> $DIR/or-patterns-syntactic-fail.rs:40:11
21 |
22 LL | let ( | A | B) = E::A;
23 | ^ help: remove the `|`
24
25 error: a leading `|` is only allowed in a top-level pattern
26 --> $DIR/or-patterns-syntactic-fail.rs:41:11
27 |
28 LL | let ( | A | B,) = (E::B,);
29 | ^ help: remove the `|`
30
31 error: a leading `|` is only allowed in a top-level pattern
32 --> $DIR/or-patterns-syntactic-fail.rs:42:11
33 |
34 LL | let [ | A | B ] = [E::A];
35 | ^ help: remove the `|`
36
37 error: a leading `|` is only allowed in a top-level pattern
38 --> $DIR/or-patterns-syntactic-fail.rs:43:13
39 |
40 LL | let TS( | A | B );
41 | ^ help: remove the `|`
42
43 error: a leading `|` is only allowed in a top-level pattern
44 --> $DIR/or-patterns-syntactic-fail.rs:44:17
45 |
46 LL | let NS { f: | A | B };
47 | ^ help: remove the `|`
48
49 error: a leading `|` is only allowed in a top-level pattern
50 --> $DIR/or-patterns-syntactic-fail.rs:46:11
51 |
52 LL | let ( || A | B) = E::A;
53 | ^^ help: remove the `||`
54 |
55 = note: alternatives in or-patterns are separated with `|`, not `||`
56
57 error: a leading `|` is only allowed in a top-level pattern
58 --> $DIR/or-patterns-syntactic-fail.rs:47:11
59 |
60 LL | let [ || A | B ] = [E::A];
61 | ^^ help: remove the `||`
62 |
63 = note: alternatives in or-patterns are separated with `|`, not `||`
64
65 error: a leading `|` is only allowed in a top-level pattern
66 --> $DIR/or-patterns-syntactic-fail.rs:48:13
67 |
68 LL | let TS( || A | B );
69 | ^^ help: remove the `||`
70 |
71 = note: alternatives in or-patterns are separated with `|`, not `||`
72
73 error: a leading `|` is only allowed in a top-level pattern
74 --> $DIR/or-patterns-syntactic-fail.rs:49:17
75 |
76 LL | let NS { f: || A | B };
77 | ^^ help: remove the `||`
78 |
79 = note: alternatives in or-patterns are separated with `|`, not `||`
80
81 error: no rules expected the token `|`
82 --> $DIR/or-patterns-syntactic-fail.rs:13:15
83 |
84 LL | macro_rules! accept_pat {
85 | ----------------------- when calling this macro
86 ...
87 LL | accept_pat!(p | q);
88 | ^ no rules expected this token in macro call
89
90 error: no rules expected the token `|`
91 --> $DIR/or-patterns-syntactic-fail.rs:14:13
92 |
93 LL | macro_rules! accept_pat {
94 | ----------------------- when calling this macro
95 ...
96 LL | accept_pat!(| p | q);
97 | ^ no rules expected this token in macro call
98
99 error[E0369]: no implementation for `E | ()`
100 --> $DIR/or-patterns-syntactic-fail.rs:23:22
101 |
102 LL | let _ = |A | B: E| ();
103 | ----^ -- ()
104 | |
105 | E
106 |
107 = note: an implementation of `std::ops::BitOr` might be missing for `E`
108
109 error[E0308]: mismatched types
110 --> $DIR/or-patterns-syntactic-fail.rs:51:36
111 |
112 LL | let recovery_witness: String = 0;
113 | ------ ^
114 | | |
115 | | expected struct `std::string::String`, found integer
116 | | help: try using a conversion method: `0.to_string()`
117 | expected due to this
118
119 error: aborting due to 16 previous errors
120
121 Some errors have detailed explanations: E0308, E0369.
122 For more information about an error, try `rustc --explain E0308`.