]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/default-on-wrong-item-kind.stderr
Auto merge of #107478 - compiler-errors:anon-enum-tys-are-ambiguous, r=estebank
[rust.git] / tests / ui / parser / default-on-wrong-item-kind.stderr
1 error: an extern crate cannot be `default`
2   --> $DIR/default-on-wrong-item-kind.rs:9:5
3    |
4 LL |     default extern crate foo;
5    |     ^^^^^^^ `default` because of this
6    |
7    = note: only associated `fn`, `const`, and `type` items can be `default`
8
9 error: a `use` import cannot be `default`
10   --> $DIR/default-on-wrong-item-kind.rs:10:5
11    |
12 LL |     default use foo;
13    |     ^^^^^^^ `default` because of this
14    |
15    = note: only associated `fn`, `const`, and `type` items can be `default`
16
17 error: a static item cannot be `default`
18   --> $DIR/default-on-wrong-item-kind.rs:11:5
19    |
20 LL |     default static foo: u8;
21    |     ^^^^^^^ `default` because of this
22    |
23    = note: only associated `fn`, `const`, and `type` items can be `default`
24
25 error: a module cannot be `default`
26   --> $DIR/default-on-wrong-item-kind.rs:14:5
27    |
28 LL |     default mod foo {}
29    |     ^^^^^^^ `default` because of this
30    |
31    = note: only associated `fn`, `const`, and `type` items can be `default`
32
33 error: an extern block cannot be `default`
34   --> $DIR/default-on-wrong-item-kind.rs:15:5
35    |
36 LL |     default extern "C" {}
37    |     ^^^^^^^ `default` because of this
38    |
39    = note: only associated `fn`, `const`, and `type` items can be `default`
40
41 error: an enum cannot be `default`
42   --> $DIR/default-on-wrong-item-kind.rs:17:5
43    |
44 LL |     default enum foo {}
45    |     ^^^^^^^ `default` because of this
46    |
47    = note: only associated `fn`, `const`, and `type` items can be `default`
48
49 error: a struct cannot be `default`
50   --> $DIR/default-on-wrong-item-kind.rs:18:5
51    |
52 LL |     default struct foo {}
53    |     ^^^^^^^ `default` because of this
54    |
55    = note: only associated `fn`, `const`, and `type` items can be `default`
56
57 error: a union cannot be `default`
58   --> $DIR/default-on-wrong-item-kind.rs:19:5
59    |
60 LL |     default union foo {}
61    |     ^^^^^^^ `default` because of this
62    |
63    = note: only associated `fn`, `const`, and `type` items can be `default`
64
65 error: a trait cannot be `default`
66   --> $DIR/default-on-wrong-item-kind.rs:20:5
67    |
68 LL |     default trait foo {}
69    |     ^^^^^^^ `default` because of this
70    |
71    = note: only associated `fn`, `const`, and `type` items can be `default`
72
73 error: a trait alias cannot be `default`
74   --> $DIR/default-on-wrong-item-kind.rs:21:5
75    |
76 LL |     default trait foo = Ord;
77    |     ^^^^^^^ `default` because of this
78    |
79    = note: only associated `fn`, `const`, and `type` items can be `default`
80
81 error: an item macro invocation cannot be `default`
82   --> $DIR/default-on-wrong-item-kind.rs:25:5
83    |
84 LL |     default default!();
85    |     ^^^^^^^ `default` because of this
86    |
87    = note: only associated `fn`, `const`, and `type` items can be `default`
88
89 error: an item macro invocation cannot be `default`
90   --> $DIR/default-on-wrong-item-kind.rs:26:5
91    |
92 LL |     default default::foo::bar!();
93    |     ^^^^^^^ `default` because of this
94    |
95    = note: only associated `fn`, `const`, and `type` items can be `default`
96
97 error: a macro definition cannot be `default`
98   --> $DIR/default-on-wrong-item-kind.rs:27:5
99    |
100 LL |     default macro foo {}
101    |     ^^^^^^^ `default` because of this
102    |
103    = note: only associated `fn`, `const`, and `type` items can be `default`
104
105 error: a macro definition cannot be `default`
106   --> $DIR/default-on-wrong-item-kind.rs:28:5
107    |
108 LL |     default macro_rules! foo {}
109    |     ^^^^^^^ `default` because of this
110    |
111    = note: only associated `fn`, `const`, and `type` items can be `default`
112
113 error: an extern crate cannot be `default`
114   --> $DIR/default-on-wrong-item-kind.rs:33:5
115    |
116 LL |     default extern crate foo;
117    |     ^^^^^^^ `default` because of this
118    |
119    = note: only associated `fn`, `const`, and `type` items can be `default`
120
121 error: extern crate is not supported in `extern` blocks
122   --> $DIR/default-on-wrong-item-kind.rs:33:5
123    |
124 LL |     default extern crate foo;
125    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
126    |
127    = help: consider moving the extern crate out to a nearby module scope
128
129 error: a `use` import cannot be `default`
130   --> $DIR/default-on-wrong-item-kind.rs:35:5
131    |
132 LL |     default use foo;
133    |     ^^^^^^^ `default` because of this
134    |
135    = note: only associated `fn`, `const`, and `type` items can be `default`
136
137 error: `use` import is not supported in `extern` blocks
138   --> $DIR/default-on-wrong-item-kind.rs:35:5
139    |
140 LL |     default use foo;
141    |     ^^^^^^^^^^^^^^^^
142    |
143    = help: consider moving the `use` import out to a nearby module scope
144
145 error: a static item cannot be `default`
146   --> $DIR/default-on-wrong-item-kind.rs:37:5
147    |
148 LL |     default static foo: u8;
149    |     ^^^^^^^ `default` because of this
150    |
151    = note: only associated `fn`, `const`, and `type` items can be `default`
152
153 error: extern items cannot be `const`
154   --> $DIR/default-on-wrong-item-kind.rs:38:19
155    |
156 LL |     default const foo: u8;
157    |     --------------^^^
158    |     |
159    |     help: try using a static value: `static`
160    |
161    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
162
163 error: a module cannot be `default`
164   --> $DIR/default-on-wrong-item-kind.rs:41:5
165    |
166 LL |     default mod foo {}
167    |     ^^^^^^^ `default` because of this
168    |
169    = note: only associated `fn`, `const`, and `type` items can be `default`
170
171 error: module is not supported in `extern` blocks
172   --> $DIR/default-on-wrong-item-kind.rs:41:5
173    |
174 LL |     default mod foo {}
175    |     ^^^^^^^^^^^^^^^
176    |
177    = help: consider moving the module out to a nearby module scope
178
179 error: an extern block cannot be `default`
180   --> $DIR/default-on-wrong-item-kind.rs:43:5
181    |
182 LL |     default extern "C" {}
183    |     ^^^^^^^ `default` because of this
184    |
185    = note: only associated `fn`, `const`, and `type` items can be `default`
186
187 error: extern block is not supported in `extern` blocks
188   --> $DIR/default-on-wrong-item-kind.rs:43:5
189    |
190 LL |     default extern "C" {}
191    |     ^^^^^^^^^^^^^^^^^^
192    |
193    = help: consider moving the extern block out to a nearby module scope
194
195 error: an enum cannot be `default`
196   --> $DIR/default-on-wrong-item-kind.rs:46:5
197    |
198 LL |     default enum foo {}
199    |     ^^^^^^^ `default` because of this
200    |
201    = note: only associated `fn`, `const`, and `type` items can be `default`
202
203 error: enum is not supported in `extern` blocks
204   --> $DIR/default-on-wrong-item-kind.rs:46:5
205    |
206 LL |     default enum foo {}
207    |     ^^^^^^^^^^^^^^^^
208    |
209    = help: consider moving the enum out to a nearby module scope
210
211 error: a struct cannot be `default`
212   --> $DIR/default-on-wrong-item-kind.rs:48:5
213    |
214 LL |     default struct foo {}
215    |     ^^^^^^^ `default` because of this
216    |
217    = note: only associated `fn`, `const`, and `type` items can be `default`
218
219 error: struct is not supported in `extern` blocks
220   --> $DIR/default-on-wrong-item-kind.rs:48:5
221    |
222 LL |     default struct foo {}
223    |     ^^^^^^^^^^^^^^^^^^
224    |
225    = help: consider moving the struct out to a nearby module scope
226
227 error: a union cannot be `default`
228   --> $DIR/default-on-wrong-item-kind.rs:50:5
229    |
230 LL |     default union foo {}
231    |     ^^^^^^^ `default` because of this
232    |
233    = note: only associated `fn`, `const`, and `type` items can be `default`
234
235 error: union is not supported in `extern` blocks
236   --> $DIR/default-on-wrong-item-kind.rs:50:5
237    |
238 LL |     default union foo {}
239    |     ^^^^^^^^^^^^^^^^^
240    |
241    = help: consider moving the union out to a nearby module scope
242
243 error: a trait cannot be `default`
244   --> $DIR/default-on-wrong-item-kind.rs:52:5
245    |
246 LL |     default trait foo {}
247    |     ^^^^^^^ `default` because of this
248    |
249    = note: only associated `fn`, `const`, and `type` items can be `default`
250
251 error: trait is not supported in `extern` blocks
252   --> $DIR/default-on-wrong-item-kind.rs:52:5
253    |
254 LL |     default trait foo {}
255    |     ^^^^^^^^^^^^^^^^^
256    |
257    = help: consider moving the trait out to a nearby module scope
258
259 error: a trait alias cannot be `default`
260   --> $DIR/default-on-wrong-item-kind.rs:54:5
261    |
262 LL |     default trait foo = Ord;
263    |     ^^^^^^^ `default` because of this
264    |
265    = note: only associated `fn`, `const`, and `type` items can be `default`
266
267 error: trait alias is not supported in `extern` blocks
268   --> $DIR/default-on-wrong-item-kind.rs:54:5
269    |
270 LL |     default trait foo = Ord;
271    |     ^^^^^^^^^^^^^^^^^^^^^^^^
272    |
273    = help: consider moving the trait alias out to a nearby module scope
274
275 error: implementation is not supported in `extern` blocks
276   --> $DIR/default-on-wrong-item-kind.rs:56:5
277    |
278 LL |     default impl foo {}
279    |     ^^^^^^^^^^^^^^^^
280    |
281    = help: consider moving the implementation out to a nearby module scope
282
283 error: an item macro invocation cannot be `default`
284   --> $DIR/default-on-wrong-item-kind.rs:60:5
285    |
286 LL |     default default!();
287    |     ^^^^^^^ `default` because of this
288    |
289    = note: only associated `fn`, `const`, and `type` items can be `default`
290
291 error: an item macro invocation cannot be `default`
292   --> $DIR/default-on-wrong-item-kind.rs:61:5
293    |
294 LL |     default default::foo::bar!();
295    |     ^^^^^^^ `default` because of this
296    |
297    = note: only associated `fn`, `const`, and `type` items can be `default`
298
299 error: a macro definition cannot be `default`
300   --> $DIR/default-on-wrong-item-kind.rs:62:5
301    |
302 LL |     default macro foo {}
303    |     ^^^^^^^ `default` because of this
304    |
305    = note: only associated `fn`, `const`, and `type` items can be `default`
306
307 error: macro definition is not supported in `extern` blocks
308   --> $DIR/default-on-wrong-item-kind.rs:62:5
309    |
310 LL |     default macro foo {}
311    |     ^^^^^^^^^^^^^^^^^
312    |
313    = help: consider moving the macro definition out to a nearby module scope
314
315 error: a macro definition cannot be `default`
316   --> $DIR/default-on-wrong-item-kind.rs:64:5
317    |
318 LL |     default macro_rules! foo {}
319    |     ^^^^^^^ `default` because of this
320    |
321    = note: only associated `fn`, `const`, and `type` items can be `default`
322
323 error: macro definition is not supported in `extern` blocks
324   --> $DIR/default-on-wrong-item-kind.rs:64:5
325    |
326 LL |     default macro_rules! foo {}
327    |     ^^^^^^^^^^^^^^^^^^^^^^^^
328    |
329    = help: consider moving the macro definition out to a nearby module scope
330
331 error: an extern crate cannot be `default`
332   --> $DIR/default-on-wrong-item-kind.rs:70:5
333    |
334 LL |     default extern crate foo;
335    |     ^^^^^^^ `default` because of this
336    |
337    = note: only associated `fn`, `const`, and `type` items can be `default`
338
339 error: extern crate is not supported in `trait`s or `impl`s
340   --> $DIR/default-on-wrong-item-kind.rs:70:5
341    |
342 LL |     default extern crate foo;
343    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
344    |
345    = help: consider moving the extern crate out to a nearby module scope
346
347 error: a `use` import cannot be `default`
348   --> $DIR/default-on-wrong-item-kind.rs:72:5
349    |
350 LL |     default use foo;
351    |     ^^^^^^^ `default` because of this
352    |
353    = note: only associated `fn`, `const`, and `type` items can be `default`
354
355 error: `use` import is not supported in `trait`s or `impl`s
356   --> $DIR/default-on-wrong-item-kind.rs:72:5
357    |
358 LL |     default use foo;
359    |     ^^^^^^^^^^^^^^^^
360    |
361    = help: consider moving the `use` import out to a nearby module scope
362
363 error: a static item cannot be `default`
364   --> $DIR/default-on-wrong-item-kind.rs:74:5
365    |
366 LL |     default static foo: u8;
367    |     ^^^^^^^ `default` because of this
368    |
369    = note: only associated `fn`, `const`, and `type` items can be `default`
370
371 error: associated `static` items are not allowed
372   --> $DIR/default-on-wrong-item-kind.rs:74:5
373    |
374 LL |     default static foo: u8;
375    |     ^^^^^^^^^^^^^^^^^^^^^^^
376
377 error: a module cannot be `default`
378   --> $DIR/default-on-wrong-item-kind.rs:78:5
379    |
380 LL |     default mod foo {}
381    |     ^^^^^^^ `default` because of this
382    |
383    = note: only associated `fn`, `const`, and `type` items can be `default`
384
385 error: module is not supported in `trait`s or `impl`s
386   --> $DIR/default-on-wrong-item-kind.rs:78:5
387    |
388 LL |     default mod foo {}
389    |     ^^^^^^^^^^^^^^^
390    |
391    = help: consider moving the module out to a nearby module scope
392
393 error: an extern block cannot be `default`
394   --> $DIR/default-on-wrong-item-kind.rs:80:5
395    |
396 LL |     default extern "C" {}
397    |     ^^^^^^^ `default` because of this
398    |
399    = note: only associated `fn`, `const`, and `type` items can be `default`
400
401 error: extern block is not supported in `trait`s or `impl`s
402   --> $DIR/default-on-wrong-item-kind.rs:80:5
403    |
404 LL |     default extern "C" {}
405    |     ^^^^^^^^^^^^^^^^^^
406    |
407    = help: consider moving the extern block out to a nearby module scope
408
409 error: an enum cannot be `default`
410   --> $DIR/default-on-wrong-item-kind.rs:83:5
411    |
412 LL |     default enum foo {}
413    |     ^^^^^^^ `default` because of this
414    |
415    = note: only associated `fn`, `const`, and `type` items can be `default`
416
417 error: enum is not supported in `trait`s or `impl`s
418   --> $DIR/default-on-wrong-item-kind.rs:83:5
419    |
420 LL |     default enum foo {}
421    |     ^^^^^^^^^^^^^^^^
422    |
423    = help: consider moving the enum out to a nearby module scope
424
425 error: a struct cannot be `default`
426   --> $DIR/default-on-wrong-item-kind.rs:85:5
427    |
428 LL |     default struct foo {}
429    |     ^^^^^^^ `default` because of this
430    |
431    = note: only associated `fn`, `const`, and `type` items can be `default`
432
433 error: struct is not supported in `trait`s or `impl`s
434   --> $DIR/default-on-wrong-item-kind.rs:85:5
435    |
436 LL |     default struct foo {}
437    |     ^^^^^^^^^^^^^^^^^^
438    |
439    = help: consider moving the struct out to a nearby module scope
440
441 error: a union cannot be `default`
442   --> $DIR/default-on-wrong-item-kind.rs:87:5
443    |
444 LL |     default union foo {}
445    |     ^^^^^^^ `default` because of this
446    |
447    = note: only associated `fn`, `const`, and `type` items can be `default`
448
449 error: union is not supported in `trait`s or `impl`s
450   --> $DIR/default-on-wrong-item-kind.rs:87:5
451    |
452 LL |     default union foo {}
453    |     ^^^^^^^^^^^^^^^^^
454    |
455    = help: consider moving the union out to a nearby module scope
456
457 error: a trait cannot be `default`
458   --> $DIR/default-on-wrong-item-kind.rs:89:5
459    |
460 LL |     default trait foo {}
461    |     ^^^^^^^ `default` because of this
462    |
463    = note: only associated `fn`, `const`, and `type` items can be `default`
464
465 error: trait is not supported in `trait`s or `impl`s
466   --> $DIR/default-on-wrong-item-kind.rs:89:5
467    |
468 LL |     default trait foo {}
469    |     ^^^^^^^^^^^^^^^^^
470    |
471    = help: consider moving the trait out to a nearby module scope
472
473 error: a trait alias cannot be `default`
474   --> $DIR/default-on-wrong-item-kind.rs:91:5
475    |
476 LL |     default trait foo = Ord;
477    |     ^^^^^^^ `default` because of this
478    |
479    = note: only associated `fn`, `const`, and `type` items can be `default`
480
481 error: trait alias is not supported in `trait`s or `impl`s
482   --> $DIR/default-on-wrong-item-kind.rs:91:5
483    |
484 LL |     default trait foo = Ord;
485    |     ^^^^^^^^^^^^^^^^^^^^^^^^
486    |
487    = help: consider moving the trait alias out to a nearby module scope
488
489 error: implementation is not supported in `trait`s or `impl`s
490   --> $DIR/default-on-wrong-item-kind.rs:93:5
491    |
492 LL |     default impl foo {}
493    |     ^^^^^^^^^^^^^^^^
494    |
495    = help: consider moving the implementation out to a nearby module scope
496
497 error: an item macro invocation cannot be `default`
498   --> $DIR/default-on-wrong-item-kind.rs:97:5
499    |
500 LL |     default default!();
501    |     ^^^^^^^ `default` because of this
502    |
503    = note: only associated `fn`, `const`, and `type` items can be `default`
504
505 error: an item macro invocation cannot be `default`
506   --> $DIR/default-on-wrong-item-kind.rs:98:5
507    |
508 LL |     default default::foo::bar!();
509    |     ^^^^^^^ `default` because of this
510    |
511    = note: only associated `fn`, `const`, and `type` items can be `default`
512
513 error: a macro definition cannot be `default`
514   --> $DIR/default-on-wrong-item-kind.rs:99:5
515    |
516 LL |     default macro foo {}
517    |     ^^^^^^^ `default` because of this
518    |
519    = note: only associated `fn`, `const`, and `type` items can be `default`
520
521 error: macro definition is not supported in `trait`s or `impl`s
522   --> $DIR/default-on-wrong-item-kind.rs:99:5
523    |
524 LL |     default macro foo {}
525    |     ^^^^^^^^^^^^^^^^^
526    |
527    = help: consider moving the macro definition out to a nearby module scope
528
529 error: a macro definition cannot be `default`
530   --> $DIR/default-on-wrong-item-kind.rs:101:5
531    |
532 LL |     default macro_rules! foo {}
533    |     ^^^^^^^ `default` because of this
534    |
535    = note: only associated `fn`, `const`, and `type` items can be `default`
536
537 error: macro definition is not supported in `trait`s or `impl`s
538   --> $DIR/default-on-wrong-item-kind.rs:101:5
539    |
540 LL |     default macro_rules! foo {}
541    |     ^^^^^^^^^^^^^^^^^^^^^^^^
542    |
543    = help: consider moving the macro definition out to a nearby module scope
544
545 error: an extern crate cannot be `default`
546   --> $DIR/default-on-wrong-item-kind.rs:107:5
547    |
548 LL |     default extern crate foo;
549    |     ^^^^^^^ `default` because of this
550    |
551    = note: only associated `fn`, `const`, and `type` items can be `default`
552
553 error: extern crate is not supported in `trait`s or `impl`s
554   --> $DIR/default-on-wrong-item-kind.rs:107:5
555    |
556 LL |     default extern crate foo;
557    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
558    |
559    = help: consider moving the extern crate out to a nearby module scope
560
561 error: a `use` import cannot be `default`
562   --> $DIR/default-on-wrong-item-kind.rs:109:5
563    |
564 LL |     default use foo;
565    |     ^^^^^^^ `default` because of this
566    |
567    = note: only associated `fn`, `const`, and `type` items can be `default`
568
569 error: `use` import is not supported in `trait`s or `impl`s
570   --> $DIR/default-on-wrong-item-kind.rs:109:5
571    |
572 LL |     default use foo;
573    |     ^^^^^^^^^^^^^^^^
574    |
575    = help: consider moving the `use` import out to a nearby module scope
576
577 error: a static item cannot be `default`
578   --> $DIR/default-on-wrong-item-kind.rs:111:5
579    |
580 LL |     default static foo: u8;
581    |     ^^^^^^^ `default` because of this
582    |
583    = note: only associated `fn`, `const`, and `type` items can be `default`
584
585 error: associated `static` items are not allowed
586   --> $DIR/default-on-wrong-item-kind.rs:111:5
587    |
588 LL |     default static foo: u8;
589    |     ^^^^^^^^^^^^^^^^^^^^^^^
590
591 error: a module cannot be `default`
592   --> $DIR/default-on-wrong-item-kind.rs:115:5
593    |
594 LL |     default mod foo {}
595    |     ^^^^^^^ `default` because of this
596    |
597    = note: only associated `fn`, `const`, and `type` items can be `default`
598
599 error: module is not supported in `trait`s or `impl`s
600   --> $DIR/default-on-wrong-item-kind.rs:115:5
601    |
602 LL |     default mod foo {}
603    |     ^^^^^^^^^^^^^^^
604    |
605    = help: consider moving the module out to a nearby module scope
606
607 error: an extern block cannot be `default`
608   --> $DIR/default-on-wrong-item-kind.rs:117:5
609    |
610 LL |     default extern "C" {}
611    |     ^^^^^^^ `default` because of this
612    |
613    = note: only associated `fn`, `const`, and `type` items can be `default`
614
615 error: extern block is not supported in `trait`s or `impl`s
616   --> $DIR/default-on-wrong-item-kind.rs:117:5
617    |
618 LL |     default extern "C" {}
619    |     ^^^^^^^^^^^^^^^^^^
620    |
621    = help: consider moving the extern block out to a nearby module scope
622
623 error: an enum cannot be `default`
624   --> $DIR/default-on-wrong-item-kind.rs:120:5
625    |
626 LL |     default enum foo {}
627    |     ^^^^^^^ `default` because of this
628    |
629    = note: only associated `fn`, `const`, and `type` items can be `default`
630
631 error: enum is not supported in `trait`s or `impl`s
632   --> $DIR/default-on-wrong-item-kind.rs:120:5
633    |
634 LL |     default enum foo {}
635    |     ^^^^^^^^^^^^^^^^
636    |
637    = help: consider moving the enum out to a nearby module scope
638
639 error: a struct cannot be `default`
640   --> $DIR/default-on-wrong-item-kind.rs:122:5
641    |
642 LL |     default struct foo {}
643    |     ^^^^^^^ `default` because of this
644    |
645    = note: only associated `fn`, `const`, and `type` items can be `default`
646
647 error: struct is not supported in `trait`s or `impl`s
648   --> $DIR/default-on-wrong-item-kind.rs:122:5
649    |
650 LL |     default struct foo {}
651    |     ^^^^^^^^^^^^^^^^^^
652    |
653    = help: consider moving the struct out to a nearby module scope
654
655 error: a union cannot be `default`
656   --> $DIR/default-on-wrong-item-kind.rs:124:5
657    |
658 LL |     default union foo {}
659    |     ^^^^^^^ `default` because of this
660    |
661    = note: only associated `fn`, `const`, and `type` items can be `default`
662
663 error: union is not supported in `trait`s or `impl`s
664   --> $DIR/default-on-wrong-item-kind.rs:124:5
665    |
666 LL |     default union foo {}
667    |     ^^^^^^^^^^^^^^^^^
668    |
669    = help: consider moving the union out to a nearby module scope
670
671 error: a trait cannot be `default`
672   --> $DIR/default-on-wrong-item-kind.rs:126:5
673    |
674 LL |     default trait foo {}
675    |     ^^^^^^^ `default` because of this
676    |
677    = note: only associated `fn`, `const`, and `type` items can be `default`
678
679 error: trait is not supported in `trait`s or `impl`s
680   --> $DIR/default-on-wrong-item-kind.rs:126:5
681    |
682 LL |     default trait foo {}
683    |     ^^^^^^^^^^^^^^^^^
684    |
685    = help: consider moving the trait out to a nearby module scope
686
687 error: a trait alias cannot be `default`
688   --> $DIR/default-on-wrong-item-kind.rs:128:5
689    |
690 LL |     default trait foo = Ord;
691    |     ^^^^^^^ `default` because of this
692    |
693    = note: only associated `fn`, `const`, and `type` items can be `default`
694
695 error: trait alias is not supported in `trait`s or `impl`s
696   --> $DIR/default-on-wrong-item-kind.rs:128:5
697    |
698 LL |     default trait foo = Ord;
699    |     ^^^^^^^^^^^^^^^^^^^^^^^^
700    |
701    = help: consider moving the trait alias out to a nearby module scope
702
703 error: implementation is not supported in `trait`s or `impl`s
704   --> $DIR/default-on-wrong-item-kind.rs:130:5
705    |
706 LL |     default impl foo {}
707    |     ^^^^^^^^^^^^^^^^
708    |
709    = help: consider moving the implementation out to a nearby module scope
710
711 error: an item macro invocation cannot be `default`
712   --> $DIR/default-on-wrong-item-kind.rs:134:5
713    |
714 LL |     default default!();
715    |     ^^^^^^^ `default` because of this
716    |
717    = note: only associated `fn`, `const`, and `type` items can be `default`
718
719 error: an item macro invocation cannot be `default`
720   --> $DIR/default-on-wrong-item-kind.rs:135:5
721    |
722 LL |     default default::foo::bar!();
723    |     ^^^^^^^ `default` because of this
724    |
725    = note: only associated `fn`, `const`, and `type` items can be `default`
726
727 error: a macro definition cannot be `default`
728   --> $DIR/default-on-wrong-item-kind.rs:136:5
729    |
730 LL |     default macro foo {}
731    |     ^^^^^^^ `default` because of this
732    |
733    = note: only associated `fn`, `const`, and `type` items can be `default`
734
735 error: macro definition is not supported in `trait`s or `impl`s
736   --> $DIR/default-on-wrong-item-kind.rs:136:5
737    |
738 LL |     default macro foo {}
739    |     ^^^^^^^^^^^^^^^^^
740    |
741    = help: consider moving the macro definition out to a nearby module scope
742
743 error: a macro definition cannot be `default`
744   --> $DIR/default-on-wrong-item-kind.rs:138:5
745    |
746 LL |     default macro_rules! foo {}
747    |     ^^^^^^^ `default` because of this
748    |
749    = note: only associated `fn`, `const`, and `type` items can be `default`
750
751 error: macro definition is not supported in `trait`s or `impl`s
752   --> $DIR/default-on-wrong-item-kind.rs:138:5
753    |
754 LL |     default macro_rules! foo {}
755    |     ^^^^^^^^^^^^^^^^^^^^^^^^
756    |
757    = help: consider moving the macro definition out to a nearby module scope
758
759 error: aborting due to 95 previous errors
760