fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
14.1 KiB483 linesraw
1error[E0603]: tuple struct constructor `A` is private
2  --> $DIR/privacy5.rs:51:16
3   |
4LL |     pub struct A(());
5   |                  -- a constructor is private if any of the fields is private
6...
7LL |     let a = a::A(());
8   |                ^
9
10error[E0603]: tuple struct constructor `B` is private
11  --> $DIR/privacy5.rs:52:16
12   |
13LL |     pub struct B(isize);
14   |                  ----- a constructor is private if any of the fields is private
15...
16LL |     let b = a::B(2);
17   |                ^
18
19error[E0603]: tuple struct constructor `C` is private
20  --> $DIR/privacy5.rs:53:16
21   |
22LL |     pub struct C(pub isize, isize);
23   |                  ---------------- a constructor is private if any of the fields is private
24...
25LL |     let c = a::C(2, 3);
26   |                ^
27
28error[E0603]: tuple struct constructor `A` is private
29  --> $DIR/privacy5.rs:56:12
30   |
31LL |     pub struct A(());
32   |                  -- a constructor is private if any of the fields is private
33...
34LL |     let a::A(()) = a;
35   |            ^
36
37error[E0603]: tuple struct constructor `A` is private
38  --> $DIR/privacy5.rs:57:12
39   |
40LL |     pub struct A(());
41   |                  -- a constructor is private if any of the fields is private
42...
43LL |     let a::A(_) = a;
44   |            ^
45
46error[E0603]: tuple struct constructor `A` is private
47  --> $DIR/privacy5.rs:58:18
48   |
49LL |     pub struct A(());
50   |                  -- a constructor is private if any of the fields is private
51...
52LL |     match a { a::A(()) => {} }
53   |                  ^
54
55error[E0603]: tuple struct constructor `A` is private
56  --> $DIR/privacy5.rs:59:18
57   |
58LL |     pub struct A(());
59   |                  -- a constructor is private if any of the fields is private
60...
61LL |     match a { a::A(_) => {} }
62   |                  ^
63
64error[E0603]: tuple struct constructor `B` is private
65  --> $DIR/privacy5.rs:61:12
66   |
67LL |     pub struct B(isize);
68   |                  ----- a constructor is private if any of the fields is private
69...
70LL |     let a::B(_) = b;
71   |            ^
72
73error[E0603]: tuple struct constructor `B` is private
74  --> $DIR/privacy5.rs:62:12
75   |
76LL |     pub struct B(isize);
77   |                  ----- a constructor is private if any of the fields is private
78...
79LL |     let a::B(_b) = b;
80   |            ^
81
82error[E0603]: tuple struct constructor `B` is private
83  --> $DIR/privacy5.rs:63:18
84   |
85LL |     pub struct B(isize);
86   |                  ----- a constructor is private if any of the fields is private
87...
88LL |     match b { a::B(_) => {} }
89   |                  ^
90
91error[E0603]: tuple struct constructor `B` is private
92  --> $DIR/privacy5.rs:64:18
93   |
94LL |     pub struct B(isize);
95   |                  ----- a constructor is private if any of the fields is private
96...
97LL |     match b { a::B(_b) => {} }
98   |                  ^
99
100error[E0603]: tuple struct constructor `B` is private
101  --> $DIR/privacy5.rs:65:18
102   |
103LL |     pub struct B(isize);
104   |                  ----- a constructor is private if any of the fields is private
105...
106LL |     match b { a::B(1) => {} a::B(_) => {} }
107   |                  ^
108
109error[E0603]: tuple struct constructor `B` is private
110  --> $DIR/privacy5.rs:65:32
111   |
112LL |     pub struct B(isize);
113   |                  ----- a constructor is private if any of the fields is private
114...
115LL |     match b { a::B(1) => {} a::B(_) => {} }
116   |                                ^
117
118error[E0603]: tuple struct constructor `C` is private
119  --> $DIR/privacy5.rs:68:12
120   |
121LL |     pub struct C(pub isize, isize);
122   |                  ---------------- a constructor is private if any of the fields is private
123...
124LL |     let a::C(_, _) = c;
125   |            ^
126
127error[E0603]: tuple struct constructor `C` is private
128  --> $DIR/privacy5.rs:69:12
129   |
130LL |     pub struct C(pub isize, isize);
131   |                  ---------------- a constructor is private if any of the fields is private
132...
133LL |     let a::C(_a, _) = c;
134   |            ^
135
136error[E0603]: tuple struct constructor `C` is private
137  --> $DIR/privacy5.rs:70:12
138   |
139LL |     pub struct C(pub isize, isize);
140   |                  ---------------- a constructor is private if any of the fields is private
141...
142LL |     let a::C(_, _b) = c;
143   |            ^
144
145error[E0603]: tuple struct constructor `C` is private
146  --> $DIR/privacy5.rs:71:12
147   |
148LL |     pub struct C(pub isize, isize);
149   |                  ---------------- a constructor is private if any of the fields is private
150...
151LL |     let a::C(_a, _b) = c;
152   |            ^
153
154error[E0603]: tuple struct constructor `C` is private
155  --> $DIR/privacy5.rs:72:18
156   |
157LL |     pub struct C(pub isize, isize);
158   |                  ---------------- a constructor is private if any of the fields is private
159...
160LL |     match c { a::C(_, _) => {} }
161   |                  ^
162
163error[E0603]: tuple struct constructor `C` is private
164  --> $DIR/privacy5.rs:73:18
165   |
166LL |     pub struct C(pub isize, isize);
167   |                  ---------------- a constructor is private if any of the fields is private
168...
169LL |     match c { a::C(_a, _) => {} }
170   |                  ^
171
172error[E0603]: tuple struct constructor `C` is private
173  --> $DIR/privacy5.rs:74:18
174   |
175LL |     pub struct C(pub isize, isize);
176   |                  ---------------- a constructor is private if any of the fields is private
177...
178LL |     match c { a::C(_, _b) => {} }
179   |                  ^
180
181error[E0603]: tuple struct constructor `C` is private
182  --> $DIR/privacy5.rs:75:18
183   |
184LL |     pub struct C(pub isize, isize);
185   |                  ---------------- a constructor is private if any of the fields is private
186...
187LL |     match c { a::C(_a, _b) => {} }
188   |                  ^
189
190error[E0603]: tuple struct constructor `A` is private
191  --> $DIR/privacy5.rs:83:17
192   |
193LL |     pub struct A(());
194   |                  -- a constructor is private if any of the fields is private
195...
196LL |     let a2 = a::A;
197   |                 ^
198
199error[E0603]: tuple struct constructor `B` is private
200  --> $DIR/privacy5.rs:84:17
201   |
202LL |     pub struct B(isize);
203   |                  ----- a constructor is private if any of the fields is private
204...
205LL |     let b2 = a::B;
206   |                 ^
207
208error[E0603]: tuple struct constructor `C` is private
209  --> $DIR/privacy5.rs:85:17
210   |
211LL |     pub struct C(pub isize, isize);
212   |                  ---------------- a constructor is private if any of the fields is private
213...
214LL |     let c2 = a::C;
215   |                 ^
216
217error[E0603]: tuple struct constructor `A` is private
218  --> $DIR/privacy5.rs:90:20
219   |
220LL |     let a = other::A(());
221   |                    ^
222   | 
223  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
224   |
225LL | pub struct A(());
226   |              -- a constructor is private if any of the fields is private
227
228error[E0603]: tuple struct constructor `B` is private
229  --> $DIR/privacy5.rs:91:20
230   |
231LL |     let b = other::B(2);
232   |                    ^
233   | 
234  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
235   |
236LL | pub struct B(isize);
237   |              ----- a constructor is private if any of the fields is private
238
239error[E0603]: tuple struct constructor `C` is private
240  --> $DIR/privacy5.rs:92:20
241   |
242LL |     let c = other::C(2, 3);
243   |                    ^
244   | 
245  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
246   |
247LL | pub struct C(pub isize, isize);
248   |              ---------------- a constructor is private if any of the fields is private
249
250error[E0603]: tuple struct constructor `A` is private
251  --> $DIR/privacy5.rs:95:16
252   |
253LL |     let other::A(()) = a;
254   |                ^
255   | 
256  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
257   |
258LL | pub struct A(());
259   |              -- a constructor is private if any of the fields is private
260
261error[E0603]: tuple struct constructor `A` is private
262  --> $DIR/privacy5.rs:96:16
263   |
264LL |     let other::A(_) = a;
265   |                ^
266   | 
267  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
268   |
269LL | pub struct A(());
270   |              -- a constructor is private if any of the fields is private
271
272error[E0603]: tuple struct constructor `A` is private
273  --> $DIR/privacy5.rs:97:22
274   |
275LL |     match a { other::A(()) => {} }
276   |                      ^
277   | 
278  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
279   |
280LL | pub struct A(());
281   |              -- a constructor is private if any of the fields is private
282
283error[E0603]: tuple struct constructor `A` is private
284  --> $DIR/privacy5.rs:98:22
285   |
286LL |     match a { other::A(_) => {} }
287   |                      ^
288   | 
289  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
290   |
291LL | pub struct A(());
292   |              -- a constructor is private if any of the fields is private
293
294error[E0603]: tuple struct constructor `B` is private
295  --> $DIR/privacy5.rs:100:16
296   |
297LL |     let other::B(_) = b;
298   |                ^
299   | 
300  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
301   |
302LL | pub struct B(isize);
303   |              ----- a constructor is private if any of the fields is private
304
305error[E0603]: tuple struct constructor `B` is private
306  --> $DIR/privacy5.rs:101:16
307   |
308LL |     let other::B(_b) = b;
309   |                ^
310   | 
311  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
312   |
313LL | pub struct B(isize);
314   |              ----- a constructor is private if any of the fields is private
315
316error[E0603]: tuple struct constructor `B` is private
317  --> $DIR/privacy5.rs:102:22
318   |
319LL |     match b { other::B(_) => {} }
320   |                      ^
321   | 
322  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
323   |
324LL | pub struct B(isize);
325   |              ----- a constructor is private if any of the fields is private
326
327error[E0603]: tuple struct constructor `B` is private
328  --> $DIR/privacy5.rs:103:22
329   |
330LL |     match b { other::B(_b) => {} }
331   |                      ^
332   | 
333  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
334   |
335LL | pub struct B(isize);
336   |              ----- a constructor is private if any of the fields is private
337
338error[E0603]: tuple struct constructor `B` is private
339  --> $DIR/privacy5.rs:104:22
340   |
341LL |     match b { other::B(1) => {}
342   |                      ^
343   | 
344  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
345   |
346LL | pub struct B(isize);
347   |              ----- a constructor is private if any of the fields is private
348
349error[E0603]: tuple struct constructor `B` is private
350  --> $DIR/privacy5.rs:105:16
351   |
352LL |         other::B(_) => {} }
353   |                ^
354   | 
355  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
356   |
357LL | pub struct B(isize);
358   |              ----- a constructor is private if any of the fields is private
359
360error[E0603]: tuple struct constructor `C` is private
361  --> $DIR/privacy5.rs:107:16
362   |
363LL |     let other::C(_, _) = c;
364   |                ^
365   | 
366  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
367   |
368LL | pub struct C(pub isize, isize);
369   |              ---------------- a constructor is private if any of the fields is private
370
371error[E0603]: tuple struct constructor `C` is private
372  --> $DIR/privacy5.rs:108:16
373   |
374LL |     let other::C(_a, _) = c;
375   |                ^
376   | 
377  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
378   |
379LL | pub struct C(pub isize, isize);
380   |              ---------------- a constructor is private if any of the fields is private
381
382error[E0603]: tuple struct constructor `C` is private
383  --> $DIR/privacy5.rs:109:16
384   |
385LL |     let other::C(_, _b) = c;
386   |                ^
387   | 
388  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
389   |
390LL | pub struct C(pub isize, isize);
391   |              ---------------- a constructor is private if any of the fields is private
392
393error[E0603]: tuple struct constructor `C` is private
394  --> $DIR/privacy5.rs:110:16
395   |
396LL |     let other::C(_a, _b) = c;
397   |                ^
398   | 
399  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
400   |
401LL | pub struct C(pub isize, isize);
402   |              ---------------- a constructor is private if any of the fields is private
403
404error[E0603]: tuple struct constructor `C` is private
405  --> $DIR/privacy5.rs:111:22
406   |
407LL |     match c { other::C(_, _) => {} }
408   |                      ^
409   | 
410  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
411   |
412LL | pub struct C(pub isize, isize);
413   |              ---------------- a constructor is private if any of the fields is private
414
415error[E0603]: tuple struct constructor `C` is private
416  --> $DIR/privacy5.rs:112:22
417   |
418LL |     match c { other::C(_a, _) => {} }
419   |                      ^
420   | 
421  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
422   |
423LL | pub struct C(pub isize, isize);
424   |              ---------------- a constructor is private if any of the fields is private
425
426error[E0603]: tuple struct constructor `C` is private
427  --> $DIR/privacy5.rs:113:22
428   |
429LL |     match c { other::C(_, _b) => {} }
430   |                      ^
431   | 
432  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
433   |
434LL | pub struct C(pub isize, isize);
435   |              ---------------- a constructor is private if any of the fields is private
436
437error[E0603]: tuple struct constructor `C` is private
438  --> $DIR/privacy5.rs:114:22
439   |
440LL |     match c { other::C(_a, _b) => {} }
441   |                      ^
442   | 
443  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
444   |
445LL | pub struct C(pub isize, isize);
446   |              ---------------- a constructor is private if any of the fields is private
447
448error[E0603]: tuple struct constructor `A` is private
449  --> $DIR/privacy5.rs:122:21
450   |
451LL |     let a2 = other::A;
452   |                     ^
453   | 
454  ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
455   |
456LL | pub struct A(());
457   |              -- a constructor is private if any of the fields is private
458
459error[E0603]: tuple struct constructor `B` is private
460  --> $DIR/privacy5.rs:123:21
461   |
462LL |     let b2 = other::B;
463   |                     ^
464   | 
465  ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
466   |
467LL | pub struct B(isize);
468   |              ----- a constructor is private if any of the fields is private
469
470error[E0603]: tuple struct constructor `C` is private
471  --> $DIR/privacy5.rs:124:21
472   |
473LL |     let c2 = other::C;
474   |                     ^
475   | 
476  ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
477   |
478LL | pub struct C(pub isize, isize);
479   |              ---------------- a constructor is private if any of the fields is private
480
481error: aborting due to 48 previous errors
482
483For more information about this error, try `rustc --explain E0603`.