]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
[rust.git] / src / test / ui / pattern / rest-pat-semantic-disallowed.stderr
1 error: `..` patterns are not allowed here
2   --> $DIR/rest-pat-semantic-disallowed.rs:10:13
3    |
4 LL |     () => { .. }
5    |             ^^
6 ...
7 LL |     let mk_pat!();
8    |         --------- in this macro invocation
9    |
10    = note: only allowed in tuple, tuple struct, and slice patterns
11    = note: this error originates in the macro `mk_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
12
13 error: `..` patterns are not allowed here
14   --> $DIR/rest-pat-semantic-disallowed.rs:18:9
15    |
16 LL |     let ..;
17    |         ^^
18    |
19    = note: only allowed in tuple, tuple struct, and slice patterns
20
21 error: `..` patterns are not allowed here
22   --> $DIR/rest-pat-semantic-disallowed.rs:21:13
23    |
24 LL |     let box ..;
25    |             ^^
26    |
27    = note: only allowed in tuple, tuple struct, and slice patterns
28
29 error: `..` patterns are not allowed here
30   --> $DIR/rest-pat-semantic-disallowed.rs:25:13
31    |
32 LL |         1 | .. => {}
33    |             ^^
34    |
35    = note: only allowed in tuple, tuple struct, and slice patterns
36
37 error: `..` patterns are not allowed here
38   --> $DIR/rest-pat-semantic-disallowed.rs:29:10
39    |
40 LL |     let &..;
41    |          ^^
42    |
43    = note: only allowed in tuple, tuple struct, and slice patterns
44
45 error: `..` patterns are not allowed here
46   --> $DIR/rest-pat-semantic-disallowed.rs:30:14
47    |
48 LL |     let &mut ..;
49    |              ^^
50    |
51    = note: only allowed in tuple, tuple struct, and slice patterns
52
53 error: `..` patterns are not allowed here
54   --> $DIR/rest-pat-semantic-disallowed.rs:33:13
55    |
56 LL |     let x @ ..;
57    |             ^^
58    |
59    = note: only allowed in tuple, tuple struct, and slice patterns
60
61 error: `..` patterns are not allowed here
62   --> $DIR/rest-pat-semantic-disallowed.rs:35:17
63    |
64 LL |     let ref x @ ..;
65    |                 ^^
66    |
67    = note: only allowed in tuple, tuple struct, and slice patterns
68
69 error: `..` patterns are not allowed here
70   --> $DIR/rest-pat-semantic-disallowed.rs:36:21
71    |
72 LL |     let ref mut x @ ..;
73    |                     ^^
74    |
75    = note: only allowed in tuple, tuple struct, and slice patterns
76
77 error: `..` can only be used once per tuple pattern
78   --> $DIR/rest-pat-semantic-disallowed.rs:43:9
79    |
80 LL |         ..,
81    |         -- previously used here
82 LL |         ..,
83    |         ^^ can only be used once per tuple pattern
84
85 error: `..` can only be used once per tuple pattern
86   --> $DIR/rest-pat-semantic-disallowed.rs:44:9
87    |
88 LL |         ..,
89    |         -- previously used here
90 LL |         ..,
91 LL |         ..
92    |         ^^ can only be used once per tuple pattern
93
94 error: `..` can only be used once per tuple pattern
95   --> $DIR/rest-pat-semantic-disallowed.rs:49:9
96    |
97 LL |         ..,
98    |         -- previously used here
99 LL |         x,
100 LL |         ..
101    |         ^^ can only be used once per tuple pattern
102
103 error: `..` can only be used once per tuple struct pattern
104   --> $DIR/rest-pat-semantic-disallowed.rs:59:9
105    |
106 LL |         ..,
107    |         -- previously used here
108 LL |         ..,
109    |         ^^ can only be used once per tuple struct pattern
110
111 error: `..` can only be used once per tuple struct pattern
112   --> $DIR/rest-pat-semantic-disallowed.rs:60:9
113    |
114 LL |         ..,
115    |         -- previously used here
116 LL |         ..,
117 LL |         ..
118    |         ^^ can only be used once per tuple struct pattern
119
120 error: `..` can only be used once per tuple struct pattern
121   --> $DIR/rest-pat-semantic-disallowed.rs:65:9
122    |
123 LL |         ..,
124    |         -- previously used here
125 LL |         x,
126 LL |         ..
127    |         ^^ can only be used once per tuple struct pattern
128
129 error: `..` can only be used once per slice pattern
130   --> $DIR/rest-pat-semantic-disallowed.rs:73:9
131    |
132 LL |         ..,
133    |         -- previously used here
134 LL |         ..,
135    |         ^^ can only be used once per slice pattern
136
137 error: `..` can only be used once per slice pattern
138   --> $DIR/rest-pat-semantic-disallowed.rs:74:9
139    |
140 LL |         ..,
141    |         -- previously used here
142 LL |         ..,
143 LL |         ..
144    |         ^^ can only be used once per slice pattern
145
146 error: `..` can only be used once per slice pattern
147   --> $DIR/rest-pat-semantic-disallowed.rs:78:17
148    |
149 LL |         ..,
150    |         -- previously used here
151 LL |         ref x @ ..,
152    |                 ^^ can only be used once per slice pattern
153
154 error: `..` can only be used once per slice pattern
155   --> $DIR/rest-pat-semantic-disallowed.rs:79:21
156    |
157 LL |         ..,
158    |         -- previously used here
159 LL |         ref x @ ..,
160 LL |         ref mut y @ ..,
161    |                     ^^ can only be used once per slice pattern
162
163 error: `..` patterns are not allowed here
164   --> $DIR/rest-pat-semantic-disallowed.rs:80:18
165    |
166 LL |         (ref z @ ..),
167    |                  ^^
168    |
169    = note: only allowed in tuple, tuple struct, and slice patterns
170
171 error: `..` can only be used once per slice pattern
172   --> $DIR/rest-pat-semantic-disallowed.rs:81:9
173    |
174 LL |         ..,
175    |         -- previously used here
176 ...
177 LL |         ..
178    |         ^^ can only be used once per slice pattern
179
180 error: `..` patterns are not allowed here
181   --> $DIR/rest-pat-semantic-disallowed.rs:17:12
182    |
183 LL |     fn foo(..: u8) {}
184    |            ^^
185    |
186    = note: only allowed in tuple, tuple struct, and slice patterns
187
188 error[E0282]: type annotations needed
189   --> $DIR/rest-pat-semantic-disallowed.rs:33:9
190    |
191 LL |     let x @ ..;
192    |         ^^^^^^
193    |
194 help: consider giving this pattern a type
195    |
196 LL |     let x @ ..: _;
197    |               +++
198
199 error: aborting due to 23 previous errors
200
201 For more information about this error, try `rustc --explain E0282`.