fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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