]> git.lizzy.rs Git - rust.git/blob - src/test/ui/or-patterns/remove-leading-vert.stderr
Rollup merge of #91915 - jackh726:issue-91899, r=Mark-Simulacrum
[rust.git] / src / test / ui / or-patterns / remove-leading-vert.stderr
1 error: top-level or-patterns are not allowed in function parameters
2   --> $DIR/remove-leading-vert.rs:11:14
3    |
4 LL |     fn fun1( | A: E) {}
5    |              ^^^ help: remove the `|`: `A`
6
7 error: unexpected `||` before function parameter
8   --> $DIR/remove-leading-vert.rs:12:14
9    |
10 LL |     fn fun2( || A: E) {}
11    |              ^^ help: remove the `||`
12    |
13    = note: alternatives in or-patterns are separated with `|`, not `||`
14
15 error: unexpected token `||` in pattern
16   --> $DIR/remove-leading-vert.rs:14:11
17    |
18 LL |     let ( || A): (E);
19    |           ^^ help: use a single `|` to separate multiple alternative patterns: `|`
20
21 error: unexpected token `||` in pattern
22   --> $DIR/remove-leading-vert.rs:17:11
23    |
24 LL |     let [ || A ]: [E; 1];
25    |           ^^ help: use a single `|` to separate multiple alternative patterns: `|`
26
27 error: unexpected token `||` in pattern
28   --> $DIR/remove-leading-vert.rs:19:13
29    |
30 LL |     let TS( || A ): TS;
31    |             ^^ help: use a single `|` to separate multiple alternative patterns: `|`
32
33 error: unexpected token `||` in pattern
34   --> $DIR/remove-leading-vert.rs:21:17
35    |
36 LL |     let NS { f: || A }: NS;
37    |                 ^^ help: use a single `|` to separate multiple alternative patterns: `|`
38
39 error: a trailing `|` is not allowed in an or-pattern
40   --> $DIR/remove-leading-vert.rs:26:13
41    |
42 LL |     let ( A | ): E;
43    |           - ^ help: remove the `|`
44    |           |
45    |           while parsing this or-pattern starting here
46
47 error: a trailing `|` is not allowed in an or-pattern
48   --> $DIR/remove-leading-vert.rs:27:12
49    |
50 LL |     let (a |,): (E,);
51    |          - ^ help: remove the `|`
52    |          |
53    |          while parsing this or-pattern starting here
54
55 error: a trailing `|` is not allowed in an or-pattern
56   --> $DIR/remove-leading-vert.rs:28:17
57    |
58 LL |     let ( A | B | ): E;
59    |           -     ^ help: remove the `|`
60    |           |
61    |           while parsing this or-pattern starting here
62
63 error: a trailing `|` is not allowed in an or-pattern
64   --> $DIR/remove-leading-vert.rs:29:17
65    |
66 LL |     let [ A | B | ]: [E; 1];
67    |           -     ^ help: remove the `|`
68    |           |
69    |           while parsing this or-pattern starting here
70
71 error: a trailing `|` is not allowed in an or-pattern
72   --> $DIR/remove-leading-vert.rs:30:18
73    |
74 LL |     let S { f: B | };
75    |                - ^ help: remove the `|`
76    |                |
77    |                while parsing this or-pattern starting here
78
79 error: unexpected token `||` in pattern
80   --> $DIR/remove-leading-vert.rs:31:13
81    |
82 LL |     let ( A || B | ): E;
83    |           - ^^ help: use a single `|` to separate multiple alternative patterns: `|`
84    |           |
85    |           while parsing this or-pattern starting here
86
87 error: a trailing `|` is not allowed in an or-pattern
88   --> $DIR/remove-leading-vert.rs:31:18
89    |
90 LL |     let ( A || B | ): E;
91    |           -      ^ help: remove the `|`
92    |           |
93    |           while parsing this or-pattern starting here
94
95 error: a trailing `|` is not allowed in an or-pattern
96   --> $DIR/remove-leading-vert.rs:34:11
97    |
98 LL |         A | => {}
99    |         - ^ help: remove the `|`
100    |         |
101    |         while parsing this or-pattern starting here
102
103 error: a trailing `|` is not allowed in an or-pattern
104   --> $DIR/remove-leading-vert.rs:35:11
105    |
106 LL |         A || => {}
107    |         - ^^ help: remove the `||`
108    |         |
109    |         while parsing this or-pattern starting here
110    |
111    = note: alternatives in or-patterns are separated with `|`, not `||`
112
113 error: unexpected token `||` in pattern
114   --> $DIR/remove-leading-vert.rs:36:11
115    |
116 LL |         A || B | => {}
117    |         - ^^ help: use a single `|` to separate multiple alternative patterns: `|`
118    |         |
119    |         while parsing this or-pattern starting here
120
121 error: a trailing `|` is not allowed in an or-pattern
122   --> $DIR/remove-leading-vert.rs:36:16
123    |
124 LL |         A || B | => {}
125    |         -      ^ help: remove the `|`
126    |         |
127    |         while parsing this or-pattern starting here
128
129 error: a trailing `|` is not allowed in an or-pattern
130   --> $DIR/remove-leading-vert.rs:38:17
131    |
132 LL |         | A | B | => {}
133    |         -       ^ help: remove the `|`
134    |         |
135    |         while parsing this or-pattern starting here
136
137 error: a trailing `|` is not allowed in an or-pattern
138   --> $DIR/remove-leading-vert.rs:45:11
139    |
140 LL |     let a | : u8 = 0;
141    |         - ^ help: remove the `|`
142    |         |
143    |         while parsing this or-pattern starting here
144
145 error: a trailing `|` is not allowed in an or-pattern
146   --> $DIR/remove-leading-vert.rs:46:11
147    |
148 LL |     let a | = 0;
149    |         - ^ help: remove the `|`
150    |         |
151    |         while parsing this or-pattern starting here
152
153 error: a trailing `|` is not allowed in an or-pattern
154   --> $DIR/remove-leading-vert.rs:47:11
155    |
156 LL |     let a | ;
157    |         - ^ help: remove the `|`
158    |         |
159    |         while parsing this or-pattern starting here
160
161 error: aborting due to 21 previous errors
162