@@ -123,6 +123,8 @@ error: extern crate is not supported in `extern` blocks
123123 |
124124LL | default extern crate foo;
125125 | ^^^^^^^^^^^^^^^^^^^^^^^^^
126+ |
127+ = help: consider moving the extern crate out to a nearby module scope
126128
127129error: a `use` import cannot be `default`
128130 --> $DIR/default-on-wrong-item-kind.rs:35:5
@@ -137,6 +139,8 @@ error: `use` import is not supported in `extern` blocks
137139 |
138140LL | default use foo;
139141 | ^^^^^^^^^^^^^^^^
142+ |
143+ = help: consider moving the `use` import out to a nearby module scope
140144
141145error: a static item cannot be `default`
142146 --> $DIR/default-on-wrong-item-kind.rs:37:5
@@ -169,6 +173,8 @@ error: module is not supported in `extern` blocks
169173 |
170174LL | default mod foo {}
171175 | ^^^^^^^^^^^^^^^
176+ |
177+ = help: consider moving the module out to a nearby module scope
172178
173179error: an extern block cannot be `default`
174180 --> $DIR/default-on-wrong-item-kind.rs:43:5
@@ -183,6 +189,8 @@ error: extern block is not supported in `extern` blocks
183189 |
184190LL | default extern "C" {}
185191 | ^^^^^^^^^^^^^^^^^^
192+ |
193+ = help: consider moving the extern block out to a nearby module scope
186194
187195error: an enum cannot be `default`
188196 --> $DIR/default-on-wrong-item-kind.rs:46:5
@@ -197,6 +205,8 @@ error: enum is not supported in `extern` blocks
197205 |
198206LL | default enum foo {}
199207 | ^^^^^^^^^^^^^^^^
208+ |
209+ = help: consider moving the enum out to a nearby module scope
200210
201211error: a struct cannot be `default`
202212 --> $DIR/default-on-wrong-item-kind.rs:48:5
@@ -211,6 +221,8 @@ error: struct is not supported in `extern` blocks
211221 |
212222LL | default struct foo {}
213223 | ^^^^^^^^^^^^^^^^^^
224+ |
225+ = help: consider moving the struct out to a nearby module scope
214226
215227error: a union cannot be `default`
216228 --> $DIR/default-on-wrong-item-kind.rs:50:5
@@ -225,6 +237,8 @@ error: union is not supported in `extern` blocks
225237 |
226238LL | default union foo {}
227239 | ^^^^^^^^^^^^^^^^^
240+ |
241+ = help: consider moving the union out to a nearby module scope
228242
229243error: a trait cannot be `default`
230244 --> $DIR/default-on-wrong-item-kind.rs:52:5
@@ -239,6 +253,8 @@ error: trait is not supported in `extern` blocks
239253 |
240254LL | default trait foo {}
241255 | ^^^^^^^^^^^^^^^^^
256+ |
257+ = help: consider moving the trait out to a nearby module scope
242258
243259error: a trait alias cannot be `default`
244260 --> $DIR/default-on-wrong-item-kind.rs:54:5
@@ -253,12 +269,16 @@ error: trait alias is not supported in `extern` blocks
253269 |
254270LL | default trait foo = Ord;
255271 | ^^^^^^^^^^^^^^^^^^^^^^^^
272+ |
273+ = help: consider moving the trait alias out to a nearby module scope
256274
257275error: implementation is not supported in `extern` blocks
258276 --> $DIR/default-on-wrong-item-kind.rs:56:5
259277 |
260278LL | default impl foo {}
261279 | ^^^^^^^^^^^^^^^^
280+ |
281+ = help: consider moving the implementation out to a nearby module scope
262282
263283error: an item macro invocation cannot be `default`
264284 --> $DIR/default-on-wrong-item-kind.rs:60:5
@@ -289,6 +309,8 @@ error: macro definition is not supported in `extern` blocks
289309 |
290310LL | default macro foo {}
291311 | ^^^^^^^^^^^^^^^^^
312+ |
313+ = help: consider moving the macro definition out to a nearby module scope
292314
293315error: a macro definition cannot be `default`
294316 --> $DIR/default-on-wrong-item-kind.rs:64:5
@@ -303,6 +325,8 @@ error: macro definition is not supported in `extern` blocks
303325 |
304326LL | default macro_rules! foo {}
305327 | ^^^^^^^^^^^^^^^^^^^^^^^^
328+ |
329+ = help: consider moving the macro definition out to a nearby module scope
306330
307331error: an extern crate cannot be `default`
308332 --> $DIR/default-on-wrong-item-kind.rs:70:5
@@ -317,6 +341,8 @@ error: extern crate is not supported in `trait`s or `impl`s
317341 |
318342LL | default extern crate foo;
319343 | ^^^^^^^^^^^^^^^^^^^^^^^^^
344+ |
345+ = help: consider moving the extern crate out to a nearby module scope
320346
321347error: a `use` import cannot be `default`
322348 --> $DIR/default-on-wrong-item-kind.rs:72:5
@@ -331,6 +357,8 @@ error: `use` import is not supported in `trait`s or `impl`s
331357 |
332358LL | default use foo;
333359 | ^^^^^^^^^^^^^^^^
360+ |
361+ = help: consider moving the `use` import out to a nearby module scope
334362
335363error: a static item cannot be `default`
336364 --> $DIR/default-on-wrong-item-kind.rs:74:5
@@ -359,6 +387,8 @@ error: module is not supported in `trait`s or `impl`s
359387 |
360388LL | default mod foo {}
361389 | ^^^^^^^^^^^^^^^
390+ |
391+ = help: consider moving the module out to a nearby module scope
362392
363393error: an extern block cannot be `default`
364394 --> $DIR/default-on-wrong-item-kind.rs:80:5
@@ -373,6 +403,8 @@ error: extern block is not supported in `trait`s or `impl`s
373403 |
374404LL | default extern "C" {}
375405 | ^^^^^^^^^^^^^^^^^^
406+ |
407+ = help: consider moving the extern block out to a nearby module scope
376408
377409error: an enum cannot be `default`
378410 --> $DIR/default-on-wrong-item-kind.rs:83:5
@@ -387,6 +419,8 @@ error: enum is not supported in `trait`s or `impl`s
387419 |
388420LL | default enum foo {}
389421 | ^^^^^^^^^^^^^^^^
422+ |
423+ = help: consider moving the enum out to a nearby module scope
390424
391425error: a struct cannot be `default`
392426 --> $DIR/default-on-wrong-item-kind.rs:85:5
@@ -401,6 +435,8 @@ error: struct is not supported in `trait`s or `impl`s
401435 |
402436LL | default struct foo {}
403437 | ^^^^^^^^^^^^^^^^^^
438+ |
439+ = help: consider moving the struct out to a nearby module scope
404440
405441error: a union cannot be `default`
406442 --> $DIR/default-on-wrong-item-kind.rs:87:5
@@ -415,6 +451,8 @@ error: union is not supported in `trait`s or `impl`s
415451 |
416452LL | default union foo {}
417453 | ^^^^^^^^^^^^^^^^^
454+ |
455+ = help: consider moving the union out to a nearby module scope
418456
419457error: a trait cannot be `default`
420458 --> $DIR/default-on-wrong-item-kind.rs:89:5
@@ -429,6 +467,8 @@ error: trait is not supported in `trait`s or `impl`s
429467 |
430468LL | default trait foo {}
431469 | ^^^^^^^^^^^^^^^^^
470+ |
471+ = help: consider moving the trait out to a nearby module scope
432472
433473error: a trait alias cannot be `default`
434474 --> $DIR/default-on-wrong-item-kind.rs:91:5
@@ -443,12 +483,16 @@ error: trait alias is not supported in `trait`s or `impl`s
443483 |
444484LL | default trait foo = Ord;
445485 | ^^^^^^^^^^^^^^^^^^^^^^^^
486+ |
487+ = help: consider moving the trait alias out to a nearby module scope
446488
447489error: implementation is not supported in `trait`s or `impl`s
448490 --> $DIR/default-on-wrong-item-kind.rs:93:5
449491 |
450492LL | default impl foo {}
451493 | ^^^^^^^^^^^^^^^^
494+ |
495+ = help: consider moving the implementation out to a nearby module scope
452496
453497error: an item macro invocation cannot be `default`
454498 --> $DIR/default-on-wrong-item-kind.rs:97:5
@@ -479,6 +523,8 @@ error: macro definition is not supported in `trait`s or `impl`s
479523 |
480524LL | default macro foo {}
481525 | ^^^^^^^^^^^^^^^^^
526+ |
527+ = help: consider moving the macro definition out to a nearby module scope
482528
483529error: a macro definition cannot be `default`
484530 --> $DIR/default-on-wrong-item-kind.rs:101:5
@@ -493,6 +539,8 @@ error: macro definition is not supported in `trait`s or `impl`s
493539 |
494540LL | default macro_rules! foo {}
495541 | ^^^^^^^^^^^^^^^^^^^^^^^^
542+ |
543+ = help: consider moving the macro definition out to a nearby module scope
496544
497545error: an extern crate cannot be `default`
498546 --> $DIR/default-on-wrong-item-kind.rs:107:5
@@ -507,6 +555,8 @@ error: extern crate is not supported in `trait`s or `impl`s
507555 |
508556LL | default extern crate foo;
509557 | ^^^^^^^^^^^^^^^^^^^^^^^^^
558+ |
559+ = help: consider moving the extern crate out to a nearby module scope
510560
511561error: a `use` import cannot be `default`
512562 --> $DIR/default-on-wrong-item-kind.rs:109:5
@@ -521,6 +571,8 @@ error: `use` import is not supported in `trait`s or `impl`s
521571 |
522572LL | default use foo;
523573 | ^^^^^^^^^^^^^^^^
574+ |
575+ = help: consider moving the `use` import out to a nearby module scope
524576
525577error: a static item cannot be `default`
526578 --> $DIR/default-on-wrong-item-kind.rs:111:5
@@ -549,6 +601,8 @@ error: module is not supported in `trait`s or `impl`s
549601 |
550602LL | default mod foo {}
551603 | ^^^^^^^^^^^^^^^
604+ |
605+ = help: consider moving the module out to a nearby module scope
552606
553607error: an extern block cannot be `default`
554608 --> $DIR/default-on-wrong-item-kind.rs:117:5
@@ -563,6 +617,8 @@ error: extern block is not supported in `trait`s or `impl`s
563617 |
564618LL | default extern "C" {}
565619 | ^^^^^^^^^^^^^^^^^^
620+ |
621+ = help: consider moving the extern block out to a nearby module scope
566622
567623error: an enum cannot be `default`
568624 --> $DIR/default-on-wrong-item-kind.rs:120:5
@@ -577,6 +633,8 @@ error: enum is not supported in `trait`s or `impl`s
577633 |
578634LL | default enum foo {}
579635 | ^^^^^^^^^^^^^^^^
636+ |
637+ = help: consider moving the enum out to a nearby module scope
580638
581639error: a struct cannot be `default`
582640 --> $DIR/default-on-wrong-item-kind.rs:122:5
@@ -591,6 +649,8 @@ error: struct is not supported in `trait`s or `impl`s
591649 |
592650LL | default struct foo {}
593651 | ^^^^^^^^^^^^^^^^^^
652+ |
653+ = help: consider moving the struct out to a nearby module scope
594654
595655error: a union cannot be `default`
596656 --> $DIR/default-on-wrong-item-kind.rs:124:5
@@ -605,6 +665,8 @@ error: union is not supported in `trait`s or `impl`s
605665 |
606666LL | default union foo {}
607667 | ^^^^^^^^^^^^^^^^^
668+ |
669+ = help: consider moving the union out to a nearby module scope
608670
609671error: a trait cannot be `default`
610672 --> $DIR/default-on-wrong-item-kind.rs:126:5
@@ -619,6 +681,8 @@ error: trait is not supported in `trait`s or `impl`s
619681 |
620682LL | default trait foo {}
621683 | ^^^^^^^^^^^^^^^^^
684+ |
685+ = help: consider moving the trait out to a nearby module scope
622686
623687error: a trait alias cannot be `default`
624688 --> $DIR/default-on-wrong-item-kind.rs:128:5
@@ -633,12 +697,16 @@ error: trait alias is not supported in `trait`s or `impl`s
633697 |
634698LL | default trait foo = Ord;
635699 | ^^^^^^^^^^^^^^^^^^^^^^^^
700+ |
701+ = help: consider moving the trait alias out to a nearby module scope
636702
637703error: implementation is not supported in `trait`s or `impl`s
638704 --> $DIR/default-on-wrong-item-kind.rs:130:5
639705 |
640706LL | default impl foo {}
641707 | ^^^^^^^^^^^^^^^^
708+ |
709+ = help: consider moving the implementation out to a nearby module scope
642710
643711error: an item macro invocation cannot be `default`
644712 --> $DIR/default-on-wrong-item-kind.rs:134:5
@@ -669,6 +737,8 @@ error: macro definition is not supported in `trait`s or `impl`s
669737 |
670738LL | default macro foo {}
671739 | ^^^^^^^^^^^^^^^^^
740+ |
741+ = help: consider moving the macro definition out to a nearby module scope
672742
673743error: a macro definition cannot be `default`
674744 --> $DIR/default-on-wrong-item-kind.rs:138:5
@@ -683,6 +753,8 @@ error: macro definition is not supported in `trait`s or `impl`s
683753 |
684754LL | default macro_rules! foo {}
685755 | ^^^^^^^^^^^^^^^^^^^^^^^^
756+ |
757+ = help: consider moving the macro definition out to a nearby module scope
686758
687759error: aborting due to 95 previous errors
688760
0 commit comments