1 error: an extern crate cannot be `default`
2 --> $DIR/default-on-wrong-item-kind.rs:9:5
4 LL | default extern crate foo;
5 | ^^^^^^^ `default` because of this
7 = note: only associated `fn`, `const`, and `type` items can be `default`
9 error: a `use` import cannot be `default`
10 --> $DIR/default-on-wrong-item-kind.rs:10:5
13 | ^^^^^^^ `default` because of this
15 = note: only associated `fn`, `const`, and `type` items can be `default`
17 error: a static item cannot be `default`
18 --> $DIR/default-on-wrong-item-kind.rs:11:5
20 LL | default static foo: u8;
21 | ^^^^^^^ `default` because of this
23 = note: only associated `fn`, `const`, and `type` items can be `default`
25 error: a module cannot be `default`
26 --> $DIR/default-on-wrong-item-kind.rs:14:5
28 LL | default mod foo {}
29 | ^^^^^^^ `default` because of this
31 = note: only associated `fn`, `const`, and `type` items can be `default`
33 error: an extern block cannot be `default`
34 --> $DIR/default-on-wrong-item-kind.rs:15:5
36 LL | default extern "C" {}
37 | ^^^^^^^ `default` because of this
39 = note: only associated `fn`, `const`, and `type` items can be `default`
41 error: an enum cannot be `default`
42 --> $DIR/default-on-wrong-item-kind.rs:17:5
44 LL | default enum foo {}
45 | ^^^^^^^ `default` because of this
47 = note: only associated `fn`, `const`, and `type` items can be `default`
49 error: a struct cannot be `default`
50 --> $DIR/default-on-wrong-item-kind.rs:18:5
52 LL | default struct foo {}
53 | ^^^^^^^ `default` because of this
55 = note: only associated `fn`, `const`, and `type` items can be `default`
57 error: a union cannot be `default`
58 --> $DIR/default-on-wrong-item-kind.rs:19:5
60 LL | default union foo {}
61 | ^^^^^^^ `default` because of this
63 = note: only associated `fn`, `const`, and `type` items can be `default`
65 error: a trait cannot be `default`
66 --> $DIR/default-on-wrong-item-kind.rs:20:5
68 LL | default trait foo {}
69 | ^^^^^^^ `default` because of this
71 = note: only associated `fn`, `const`, and `type` items can be `default`
73 error: a trait alias cannot be `default`
74 --> $DIR/default-on-wrong-item-kind.rs:21:5
76 LL | default trait foo = Ord;
77 | ^^^^^^^ `default` because of this
79 = note: only associated `fn`, `const`, and `type` items can be `default`
81 error: an item macro invocation cannot be `default`
82 --> $DIR/default-on-wrong-item-kind.rs:25:5
84 LL | default default!();
85 | ^^^^^^^ `default` because of this
87 = note: only associated `fn`, `const`, and `type` items can be `default`
89 error: an item macro invocation cannot be `default`
90 --> $DIR/default-on-wrong-item-kind.rs:26:5
92 LL | default default::foo::bar!();
93 | ^^^^^^^ `default` because of this
95 = note: only associated `fn`, `const`, and `type` items can be `default`
97 error: a macro definition cannot be `default`
98 --> $DIR/default-on-wrong-item-kind.rs:27:5
100 LL | default macro foo {}
101 | ^^^^^^^ `default` because of this
103 = note: only associated `fn`, `const`, and `type` items can be `default`
105 error: a macro definition cannot be `default`
106 --> $DIR/default-on-wrong-item-kind.rs:28:5
108 LL | default macro_rules! foo {}
109 | ^^^^^^^ `default` because of this
111 = note: only associated `fn`, `const`, and `type` items can be `default`
113 error: an extern crate cannot be `default`
114 --> $DIR/default-on-wrong-item-kind.rs:33:5
116 LL | default extern crate foo;
117 | ^^^^^^^ `default` because of this
119 = note: only associated `fn`, `const`, and `type` items can be `default`
121 error: extern crate is not supported in `extern` blocks
122 --> $DIR/default-on-wrong-item-kind.rs:33:5
124 LL | default extern crate foo;
125 | ^^^^^^^^^^^^^^^^^^^^^^^^^
127 = help: consider moving the extern crate out to a nearby module scope
129 error: a `use` import cannot be `default`
130 --> $DIR/default-on-wrong-item-kind.rs:35:5
132 LL | default use foo;
133 | ^^^^^^^ `default` because of this
135 = note: only associated `fn`, `const`, and `type` items can be `default`
137 error: `use` import is not supported in `extern` blocks
138 --> $DIR/default-on-wrong-item-kind.rs:35:5
140 LL | default use foo;
143 = help: consider moving the `use` import out to a nearby module scope
145 error: a static item cannot be `default`
146 --> $DIR/default-on-wrong-item-kind.rs:37:5
148 LL | default static foo: u8;
149 | ^^^^^^^ `default` because of this
151 = note: only associated `fn`, `const`, and `type` items can be `default`
153 error: extern items cannot be `const`
154 --> $DIR/default-on-wrong-item-kind.rs:38:19
156 LL | default const foo: u8;
159 | help: try using a static value: `static`
161 = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
163 error: a module cannot be `default`
164 --> $DIR/default-on-wrong-item-kind.rs:41:5
166 LL | default mod foo {}
167 | ^^^^^^^ `default` because of this
169 = note: only associated `fn`, `const`, and `type` items can be `default`
171 error: module is not supported in `extern` blocks
172 --> $DIR/default-on-wrong-item-kind.rs:41:5
174 LL | default mod foo {}
177 = help: consider moving the module out to a nearby module scope
179 error: an extern block cannot be `default`
180 --> $DIR/default-on-wrong-item-kind.rs:43:5
182 LL | default extern "C" {}
183 | ^^^^^^^ `default` because of this
185 = note: only associated `fn`, `const`, and `type` items can be `default`
187 error: extern block is not supported in `extern` blocks
188 --> $DIR/default-on-wrong-item-kind.rs:43:5
190 LL | default extern "C" {}
193 = help: consider moving the extern block out to a nearby module scope
195 error: an enum cannot be `default`
196 --> $DIR/default-on-wrong-item-kind.rs:46:5
198 LL | default enum foo {}
199 | ^^^^^^^ `default` because of this
201 = note: only associated `fn`, `const`, and `type` items can be `default`
203 error: enum is not supported in `extern` blocks
204 --> $DIR/default-on-wrong-item-kind.rs:46:5
206 LL | default enum foo {}
209 = help: consider moving the enum out to a nearby module scope
211 error: a struct cannot be `default`
212 --> $DIR/default-on-wrong-item-kind.rs:48:5
214 LL | default struct foo {}
215 | ^^^^^^^ `default` because of this
217 = note: only associated `fn`, `const`, and `type` items can be `default`
219 error: struct is not supported in `extern` blocks
220 --> $DIR/default-on-wrong-item-kind.rs:48:5
222 LL | default struct foo {}
225 = help: consider moving the struct out to a nearby module scope
227 error: a union cannot be `default`
228 --> $DIR/default-on-wrong-item-kind.rs:50:5
230 LL | default union foo {}
231 | ^^^^^^^ `default` because of this
233 = note: only associated `fn`, `const`, and `type` items can be `default`
235 error: union is not supported in `extern` blocks
236 --> $DIR/default-on-wrong-item-kind.rs:50:5
238 LL | default union foo {}
241 = help: consider moving the union out to a nearby module scope
243 error: a trait cannot be `default`
244 --> $DIR/default-on-wrong-item-kind.rs:52:5
246 LL | default trait foo {}
247 | ^^^^^^^ `default` because of this
249 = note: only associated `fn`, `const`, and `type` items can be `default`
251 error: trait is not supported in `extern` blocks
252 --> $DIR/default-on-wrong-item-kind.rs:52:5
254 LL | default trait foo {}
257 = help: consider moving the trait out to a nearby module scope
259 error: a trait alias cannot be `default`
260 --> $DIR/default-on-wrong-item-kind.rs:54:5
262 LL | default trait foo = Ord;
263 | ^^^^^^^ `default` because of this
265 = note: only associated `fn`, `const`, and `type` items can be `default`
267 error: trait alias is not supported in `extern` blocks
268 --> $DIR/default-on-wrong-item-kind.rs:54:5
270 LL | default trait foo = Ord;
271 | ^^^^^^^^^^^^^^^^^^^^^^^^
273 = help: consider moving the trait alias out to a nearby module scope
275 error: implementation is not supported in `extern` blocks
276 --> $DIR/default-on-wrong-item-kind.rs:56:5
278 LL | default impl foo {}
281 = help: consider moving the implementation out to a nearby module scope
283 error: an item macro invocation cannot be `default`
284 --> $DIR/default-on-wrong-item-kind.rs:60:5
286 LL | default default!();
287 | ^^^^^^^ `default` because of this
289 = note: only associated `fn`, `const`, and `type` items can be `default`
291 error: an item macro invocation cannot be `default`
292 --> $DIR/default-on-wrong-item-kind.rs:61:5
294 LL | default default::foo::bar!();
295 | ^^^^^^^ `default` because of this
297 = note: only associated `fn`, `const`, and `type` items can be `default`
299 error: a macro definition cannot be `default`
300 --> $DIR/default-on-wrong-item-kind.rs:62:5
302 LL | default macro foo {}
303 | ^^^^^^^ `default` because of this
305 = note: only associated `fn`, `const`, and `type` items can be `default`
307 error: macro definition is not supported in `extern` blocks
308 --> $DIR/default-on-wrong-item-kind.rs:62:5
310 LL | default macro foo {}
313 = help: consider moving the macro definition out to a nearby module scope
315 error: a macro definition cannot be `default`
316 --> $DIR/default-on-wrong-item-kind.rs:64:5
318 LL | default macro_rules! foo {}
319 | ^^^^^^^ `default` because of this
321 = note: only associated `fn`, `const`, and `type` items can be `default`
323 error: macro definition is not supported in `extern` blocks
324 --> $DIR/default-on-wrong-item-kind.rs:64:5
326 LL | default macro_rules! foo {}
327 | ^^^^^^^^^^^^^^^^^^^^^^^^
329 = help: consider moving the macro definition out to a nearby module scope
331 error: an extern crate cannot be `default`
332 --> $DIR/default-on-wrong-item-kind.rs:70:5
334 LL | default extern crate foo;
335 | ^^^^^^^ `default` because of this
337 = note: only associated `fn`, `const`, and `type` items can be `default`
339 error: extern crate is not supported in `trait`s or `impl`s
340 --> $DIR/default-on-wrong-item-kind.rs:70:5
342 LL | default extern crate foo;
343 | ^^^^^^^^^^^^^^^^^^^^^^^^^
345 = help: consider moving the extern crate out to a nearby module scope
347 error: a `use` import cannot be `default`
348 --> $DIR/default-on-wrong-item-kind.rs:72:5
350 LL | default use foo;
351 | ^^^^^^^ `default` because of this
353 = note: only associated `fn`, `const`, and `type` items can be `default`
355 error: `use` import is not supported in `trait`s or `impl`s
356 --> $DIR/default-on-wrong-item-kind.rs:72:5
358 LL | default use foo;
361 = help: consider moving the `use` import out to a nearby module scope
363 error: a static item cannot be `default`
364 --> $DIR/default-on-wrong-item-kind.rs:74:5
366 LL | default static foo: u8;
367 | ^^^^^^^ `default` because of this
369 = note: only associated `fn`, `const`, and `type` items can be `default`
371 error: associated `static` items are not allowed
372 --> $DIR/default-on-wrong-item-kind.rs:74:5
374 LL | default static foo: u8;
375 | ^^^^^^^^^^^^^^^^^^^^^^^
377 error: a module cannot be `default`
378 --> $DIR/default-on-wrong-item-kind.rs:78:5
380 LL | default mod foo {}
381 | ^^^^^^^ `default` because of this
383 = note: only associated `fn`, `const`, and `type` items can be `default`
385 error: module is not supported in `trait`s or `impl`s
386 --> $DIR/default-on-wrong-item-kind.rs:78:5
388 LL | default mod foo {}
391 = help: consider moving the module out to a nearby module scope
393 error: an extern block cannot be `default`
394 --> $DIR/default-on-wrong-item-kind.rs:80:5
396 LL | default extern "C" {}
397 | ^^^^^^^ `default` because of this
399 = note: only associated `fn`, `const`, and `type` items can be `default`
401 error: extern block is not supported in `trait`s or `impl`s
402 --> $DIR/default-on-wrong-item-kind.rs:80:5
404 LL | default extern "C" {}
407 = help: consider moving the extern block out to a nearby module scope
409 error: an enum cannot be `default`
410 --> $DIR/default-on-wrong-item-kind.rs:83:5
412 LL | default enum foo {}
413 | ^^^^^^^ `default` because of this
415 = note: only associated `fn`, `const`, and `type` items can be `default`
417 error: enum is not supported in `trait`s or `impl`s
418 --> $DIR/default-on-wrong-item-kind.rs:83:5
420 LL | default enum foo {}
423 = help: consider moving the enum out to a nearby module scope
425 error: a struct cannot be `default`
426 --> $DIR/default-on-wrong-item-kind.rs:85:5
428 LL | default struct foo {}
429 | ^^^^^^^ `default` because of this
431 = note: only associated `fn`, `const`, and `type` items can be `default`
433 error: struct is not supported in `trait`s or `impl`s
434 --> $DIR/default-on-wrong-item-kind.rs:85:5
436 LL | default struct foo {}
439 = help: consider moving the struct out to a nearby module scope
441 error: a union cannot be `default`
442 --> $DIR/default-on-wrong-item-kind.rs:87:5
444 LL | default union foo {}
445 | ^^^^^^^ `default` because of this
447 = note: only associated `fn`, `const`, and `type` items can be `default`
449 error: union is not supported in `trait`s or `impl`s
450 --> $DIR/default-on-wrong-item-kind.rs:87:5
452 LL | default union foo {}
455 = help: consider moving the union out to a nearby module scope
457 error: a trait cannot be `default`
458 --> $DIR/default-on-wrong-item-kind.rs:89:5
460 LL | default trait foo {}
461 | ^^^^^^^ `default` because of this
463 = note: only associated `fn`, `const`, and `type` items can be `default`
465 error: trait is not supported in `trait`s or `impl`s
466 --> $DIR/default-on-wrong-item-kind.rs:89:5
468 LL | default trait foo {}
471 = help: consider moving the trait out to a nearby module scope
473 error: a trait alias cannot be `default`
474 --> $DIR/default-on-wrong-item-kind.rs:91:5
476 LL | default trait foo = Ord;
477 | ^^^^^^^ `default` because of this
479 = note: only associated `fn`, `const`, and `type` items can be `default`
481 error: trait alias is not supported in `trait`s or `impl`s
482 --> $DIR/default-on-wrong-item-kind.rs:91:5
484 LL | default trait foo = Ord;
485 | ^^^^^^^^^^^^^^^^^^^^^^^^
487 = help: consider moving the trait alias out to a nearby module scope
489 error: implementation is not supported in `trait`s or `impl`s
490 --> $DIR/default-on-wrong-item-kind.rs:93:5
492 LL | default impl foo {}
495 = help: consider moving the implementation out to a nearby module scope
497 error: an item macro invocation cannot be `default`
498 --> $DIR/default-on-wrong-item-kind.rs:97:5
500 LL | default default!();
501 | ^^^^^^^ `default` because of this
503 = note: only associated `fn`, `const`, and `type` items can be `default`
505 error: an item macro invocation cannot be `default`
506 --> $DIR/default-on-wrong-item-kind.rs:98:5
508 LL | default default::foo::bar!();
509 | ^^^^^^^ `default` because of this
511 = note: only associated `fn`, `const`, and `type` items can be `default`
513 error: a macro definition cannot be `default`
514 --> $DIR/default-on-wrong-item-kind.rs:99:5
516 LL | default macro foo {}
517 | ^^^^^^^ `default` because of this
519 = note: only associated `fn`, `const`, and `type` items can be `default`
521 error: macro definition is not supported in `trait`s or `impl`s
522 --> $DIR/default-on-wrong-item-kind.rs:99:5
524 LL | default macro foo {}
527 = help: consider moving the macro definition out to a nearby module scope
529 error: a macro definition cannot be `default`
530 --> $DIR/default-on-wrong-item-kind.rs:101:5
532 LL | default macro_rules! foo {}
533 | ^^^^^^^ `default` because of this
535 = note: only associated `fn`, `const`, and `type` items can be `default`
537 error: macro definition is not supported in `trait`s or `impl`s
538 --> $DIR/default-on-wrong-item-kind.rs:101:5
540 LL | default macro_rules! foo {}
541 | ^^^^^^^^^^^^^^^^^^^^^^^^
543 = help: consider moving the macro definition out to a nearby module scope
545 error: an extern crate cannot be `default`
546 --> $DIR/default-on-wrong-item-kind.rs:107:5
548 LL | default extern crate foo;
549 | ^^^^^^^ `default` because of this
551 = note: only associated `fn`, `const`, and `type` items can be `default`
553 error: extern crate is not supported in `trait`s or `impl`s
554 --> $DIR/default-on-wrong-item-kind.rs:107:5
556 LL | default extern crate foo;
557 | ^^^^^^^^^^^^^^^^^^^^^^^^^
559 = help: consider moving the extern crate out to a nearby module scope
561 error: a `use` import cannot be `default`
562 --> $DIR/default-on-wrong-item-kind.rs:109:5
564 LL | default use foo;
565 | ^^^^^^^ `default` because of this
567 = note: only associated `fn`, `const`, and `type` items can be `default`
569 error: `use` import is not supported in `trait`s or `impl`s
570 --> $DIR/default-on-wrong-item-kind.rs:109:5
572 LL | default use foo;
575 = help: consider moving the `use` import out to a nearby module scope
577 error: a static item cannot be `default`
578 --> $DIR/default-on-wrong-item-kind.rs:111:5
580 LL | default static foo: u8;
581 | ^^^^^^^ `default` because of this
583 = note: only associated `fn`, `const`, and `type` items can be `default`
585 error: associated `static` items are not allowed
586 --> $DIR/default-on-wrong-item-kind.rs:111:5
588 LL | default static foo: u8;
589 | ^^^^^^^^^^^^^^^^^^^^^^^
591 error: a module cannot be `default`
592 --> $DIR/default-on-wrong-item-kind.rs:115:5
594 LL | default mod foo {}
595 | ^^^^^^^ `default` because of this
597 = note: only associated `fn`, `const`, and `type` items can be `default`
599 error: module is not supported in `trait`s or `impl`s
600 --> $DIR/default-on-wrong-item-kind.rs:115:5
602 LL | default mod foo {}
605 = help: consider moving the module out to a nearby module scope
607 error: an extern block cannot be `default`
608 --> $DIR/default-on-wrong-item-kind.rs:117:5
610 LL | default extern "C" {}
611 | ^^^^^^^ `default` because of this
613 = note: only associated `fn`, `const`, and `type` items can be `default`
615 error: extern block is not supported in `trait`s or `impl`s
616 --> $DIR/default-on-wrong-item-kind.rs:117:5
618 LL | default extern "C" {}
621 = help: consider moving the extern block out to a nearby module scope
623 error: an enum cannot be `default`
624 --> $DIR/default-on-wrong-item-kind.rs:120:5
626 LL | default enum foo {}
627 | ^^^^^^^ `default` because of this
629 = note: only associated `fn`, `const`, and `type` items can be `default`
631 error: enum is not supported in `trait`s or `impl`s
632 --> $DIR/default-on-wrong-item-kind.rs:120:5
634 LL | default enum foo {}
637 = help: consider moving the enum out to a nearby module scope
639 error: a struct cannot be `default`
640 --> $DIR/default-on-wrong-item-kind.rs:122:5
642 LL | default struct foo {}
643 | ^^^^^^^ `default` because of this
645 = note: only associated `fn`, `const`, and `type` items can be `default`
647 error: struct is not supported in `trait`s or `impl`s
648 --> $DIR/default-on-wrong-item-kind.rs:122:5
650 LL | default struct foo {}
653 = help: consider moving the struct out to a nearby module scope
655 error: a union cannot be `default`
656 --> $DIR/default-on-wrong-item-kind.rs:124:5
658 LL | default union foo {}
659 | ^^^^^^^ `default` because of this
661 = note: only associated `fn`, `const`, and `type` items can be `default`
663 error: union is not supported in `trait`s or `impl`s
664 --> $DIR/default-on-wrong-item-kind.rs:124:5
666 LL | default union foo {}
669 = help: consider moving the union out to a nearby module scope
671 error: a trait cannot be `default`
672 --> $DIR/default-on-wrong-item-kind.rs:126:5
674 LL | default trait foo {}
675 | ^^^^^^^ `default` because of this
677 = note: only associated `fn`, `const`, and `type` items can be `default`
679 error: trait is not supported in `trait`s or `impl`s
680 --> $DIR/default-on-wrong-item-kind.rs:126:5
682 LL | default trait foo {}
685 = help: consider moving the trait out to a nearby module scope
687 error: a trait alias cannot be `default`
688 --> $DIR/default-on-wrong-item-kind.rs:128:5
690 LL | default trait foo = Ord;
691 | ^^^^^^^ `default` because of this
693 = note: only associated `fn`, `const`, and `type` items can be `default`
695 error: trait alias is not supported in `trait`s or `impl`s
696 --> $DIR/default-on-wrong-item-kind.rs:128:5
698 LL | default trait foo = Ord;
699 | ^^^^^^^^^^^^^^^^^^^^^^^^
701 = help: consider moving the trait alias out to a nearby module scope
703 error: implementation is not supported in `trait`s or `impl`s
704 --> $DIR/default-on-wrong-item-kind.rs:130:5
706 LL | default impl foo {}
709 = help: consider moving the implementation out to a nearby module scope
711 error: an item macro invocation cannot be `default`
712 --> $DIR/default-on-wrong-item-kind.rs:134:5
714 LL | default default!();
715 | ^^^^^^^ `default` because of this
717 = note: only associated `fn`, `const`, and `type` items can be `default`
719 error: an item macro invocation cannot be `default`
720 --> $DIR/default-on-wrong-item-kind.rs:135:5
722 LL | default default::foo::bar!();
723 | ^^^^^^^ `default` because of this
725 = note: only associated `fn`, `const`, and `type` items can be `default`
727 error: a macro definition cannot be `default`
728 --> $DIR/default-on-wrong-item-kind.rs:136:5
730 LL | default macro foo {}
731 | ^^^^^^^ `default` because of this
733 = note: only associated `fn`, `const`, and `type` items can be `default`
735 error: macro definition is not supported in `trait`s or `impl`s
736 --> $DIR/default-on-wrong-item-kind.rs:136:5
738 LL | default macro foo {}
741 = help: consider moving the macro definition out to a nearby module scope
743 error: a macro definition cannot be `default`
744 --> $DIR/default-on-wrong-item-kind.rs:138:5
746 LL | default macro_rules! foo {}
747 | ^^^^^^^ `default` because of this
749 = note: only associated `fn`, `const`, and `type` items can be `default`
751 error: macro definition is not supported in `trait`s or `impl`s
752 --> $DIR/default-on-wrong-item-kind.rs:138:5
754 LL | default macro_rules! foo {}
755 | ^^^^^^^^^^^^^^^^^^^^^^^^
757 = help: consider moving the macro definition out to a nearby module scope
759 error: aborting due to 95 previous errors