@@ -123,6 +123,8 @@ error: extern crate is not supported in `extern` blocks
123
123
|
124
124
LL | default extern crate foo;
125
125
| ^^^^^^^^^^^^^^^^^^^^^^^^^
126
+ |
127
+ = help: consider moving the extern crate out to a nearby module scope
126
128
127
129
error: a `use` import cannot be `default`
128
130
--> $DIR/default-on-wrong-item-kind.rs:35:5
@@ -137,6 +139,8 @@ error: `use` import is not supported in `extern` blocks
137
139
|
138
140
LL | default use foo;
139
141
| ^^^^^^^^^^^^^^^^
142
+ |
143
+ = help: consider moving the `use` import out to a nearby module scope
140
144
141
145
error: a static item cannot be `default`
142
146
--> $DIR/default-on-wrong-item-kind.rs:37:5
@@ -169,6 +173,8 @@ error: module is not supported in `extern` blocks
169
173
|
170
174
LL | default mod foo {}
171
175
| ^^^^^^^^^^^^^^^
176
+ |
177
+ = help: consider moving the module out to a nearby module scope
172
178
173
179
error: an extern block cannot be `default`
174
180
--> $DIR/default-on-wrong-item-kind.rs:43:5
@@ -183,6 +189,8 @@ error: extern block is not supported in `extern` blocks
183
189
|
184
190
LL | default extern "C" {}
185
191
| ^^^^^^^^^^^^^^^^^^
192
+ |
193
+ = help: consider moving the extern block out to a nearby module scope
186
194
187
195
error: an enum cannot be `default`
188
196
--> $DIR/default-on-wrong-item-kind.rs:46:5
@@ -197,6 +205,8 @@ error: enum is not supported in `extern` blocks
197
205
|
198
206
LL | default enum foo {}
199
207
| ^^^^^^^^^^^^^^^^
208
+ |
209
+ = help: consider moving the enum out to a nearby module scope
200
210
201
211
error: a struct cannot be `default`
202
212
--> $DIR/default-on-wrong-item-kind.rs:48:5
@@ -211,6 +221,8 @@ error: struct is not supported in `extern` blocks
211
221
|
212
222
LL | default struct foo {}
213
223
| ^^^^^^^^^^^^^^^^^^
224
+ |
225
+ = help: consider moving the struct out to a nearby module scope
214
226
215
227
error: a union cannot be `default`
216
228
--> $DIR/default-on-wrong-item-kind.rs:50:5
@@ -225,6 +237,8 @@ error: union is not supported in `extern` blocks
225
237
|
226
238
LL | default union foo {}
227
239
| ^^^^^^^^^^^^^^^^^
240
+ |
241
+ = help: consider moving the union out to a nearby module scope
228
242
229
243
error: a trait cannot be `default`
230
244
--> $DIR/default-on-wrong-item-kind.rs:52:5
@@ -239,6 +253,8 @@ error: trait is not supported in `extern` blocks
239
253
|
240
254
LL | default trait foo {}
241
255
| ^^^^^^^^^^^^^^^^^
256
+ |
257
+ = help: consider moving the trait out to a nearby module scope
242
258
243
259
error: a trait alias cannot be `default`
244
260
--> $DIR/default-on-wrong-item-kind.rs:54:5
@@ -253,12 +269,16 @@ error: trait alias is not supported in `extern` blocks
253
269
|
254
270
LL | default trait foo = Ord;
255
271
| ^^^^^^^^^^^^^^^^^^^^^^^^
272
+ |
273
+ = help: consider moving the trait alias out to a nearby module scope
256
274
257
275
error: implementation is not supported in `extern` blocks
258
276
--> $DIR/default-on-wrong-item-kind.rs:56:5
259
277
|
260
278
LL | default impl foo {}
261
279
| ^^^^^^^^^^^^^^^^
280
+ |
281
+ = help: consider moving the implementation out to a nearby module scope
262
282
263
283
error: an item macro invocation cannot be `default`
264
284
--> $DIR/default-on-wrong-item-kind.rs:60:5
@@ -289,6 +309,8 @@ error: macro definition is not supported in `extern` blocks
289
309
|
290
310
LL | default macro foo {}
291
311
| ^^^^^^^^^^^^^^^^^
312
+ |
313
+ = help: consider moving the macro definition out to a nearby module scope
292
314
293
315
error: a macro definition cannot be `default`
294
316
--> $DIR/default-on-wrong-item-kind.rs:64:5
@@ -303,6 +325,8 @@ error: macro definition is not supported in `extern` blocks
303
325
|
304
326
LL | default macro_rules! foo {}
305
327
| ^^^^^^^^^^^^^^^^^^^^^^^^
328
+ |
329
+ = help: consider moving the macro definition out to a nearby module scope
306
330
307
331
error: an extern crate cannot be `default`
308
332
--> $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
317
341
|
318
342
LL | default extern crate foo;
319
343
| ^^^^^^^^^^^^^^^^^^^^^^^^^
344
+ |
345
+ = help: consider moving the extern crate out to a nearby module scope
320
346
321
347
error: a `use` import cannot be `default`
322
348
--> $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
331
357
|
332
358
LL | default use foo;
333
359
| ^^^^^^^^^^^^^^^^
360
+ |
361
+ = help: consider moving the `use` import out to a nearby module scope
334
362
335
363
error: a static item cannot be `default`
336
364
--> $DIR/default-on-wrong-item-kind.rs:74:5
@@ -359,6 +387,8 @@ error: module is not supported in `trait`s or `impl`s
359
387
|
360
388
LL | default mod foo {}
361
389
| ^^^^^^^^^^^^^^^
390
+ |
391
+ = help: consider moving the module out to a nearby module scope
362
392
363
393
error: an extern block cannot be `default`
364
394
--> $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
373
403
|
374
404
LL | default extern "C" {}
375
405
| ^^^^^^^^^^^^^^^^^^
406
+ |
407
+ = help: consider moving the extern block out to a nearby module scope
376
408
377
409
error: an enum cannot be `default`
378
410
--> $DIR/default-on-wrong-item-kind.rs:83:5
@@ -387,6 +419,8 @@ error: enum is not supported in `trait`s or `impl`s
387
419
|
388
420
LL | default enum foo {}
389
421
| ^^^^^^^^^^^^^^^^
422
+ |
423
+ = help: consider moving the enum out to a nearby module scope
390
424
391
425
error: a struct cannot be `default`
392
426
--> $DIR/default-on-wrong-item-kind.rs:85:5
@@ -401,6 +435,8 @@ error: struct is not supported in `trait`s or `impl`s
401
435
|
402
436
LL | default struct foo {}
403
437
| ^^^^^^^^^^^^^^^^^^
438
+ |
439
+ = help: consider moving the struct out to a nearby module scope
404
440
405
441
error: a union cannot be `default`
406
442
--> $DIR/default-on-wrong-item-kind.rs:87:5
@@ -415,6 +451,8 @@ error: union is not supported in `trait`s or `impl`s
415
451
|
416
452
LL | default union foo {}
417
453
| ^^^^^^^^^^^^^^^^^
454
+ |
455
+ = help: consider moving the union out to a nearby module scope
418
456
419
457
error: a trait cannot be `default`
420
458
--> $DIR/default-on-wrong-item-kind.rs:89:5
@@ -429,6 +467,8 @@ error: trait is not supported in `trait`s or `impl`s
429
467
|
430
468
LL | default trait foo {}
431
469
| ^^^^^^^^^^^^^^^^^
470
+ |
471
+ = help: consider moving the trait out to a nearby module scope
432
472
433
473
error: a trait alias cannot be `default`
434
474
--> $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
443
483
|
444
484
LL | default trait foo = Ord;
445
485
| ^^^^^^^^^^^^^^^^^^^^^^^^
486
+ |
487
+ = help: consider moving the trait alias out to a nearby module scope
446
488
447
489
error: implementation is not supported in `trait`s or `impl`s
448
490
--> $DIR/default-on-wrong-item-kind.rs:93:5
449
491
|
450
492
LL | default impl foo {}
451
493
| ^^^^^^^^^^^^^^^^
494
+ |
495
+ = help: consider moving the implementation out to a nearby module scope
452
496
453
497
error: an item macro invocation cannot be `default`
454
498
--> $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
479
523
|
480
524
LL | default macro foo {}
481
525
| ^^^^^^^^^^^^^^^^^
526
+ |
527
+ = help: consider moving the macro definition out to a nearby module scope
482
528
483
529
error: a macro definition cannot be `default`
484
530
--> $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
493
539
|
494
540
LL | default macro_rules! foo {}
495
541
| ^^^^^^^^^^^^^^^^^^^^^^^^
542
+ |
543
+ = help: consider moving the macro definition out to a nearby module scope
496
544
497
545
error: an extern crate cannot be `default`
498
546
--> $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
507
555
|
508
556
LL | default extern crate foo;
509
557
| ^^^^^^^^^^^^^^^^^^^^^^^^^
558
+ |
559
+ = help: consider moving the extern crate out to a nearby module scope
510
560
511
561
error: a `use` import cannot be `default`
512
562
--> $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
521
571
|
522
572
LL | default use foo;
523
573
| ^^^^^^^^^^^^^^^^
574
+ |
575
+ = help: consider moving the `use` import out to a nearby module scope
524
576
525
577
error: a static item cannot be `default`
526
578
--> $DIR/default-on-wrong-item-kind.rs:111:5
@@ -549,6 +601,8 @@ error: module is not supported in `trait`s or `impl`s
549
601
|
550
602
LL | default mod foo {}
551
603
| ^^^^^^^^^^^^^^^
604
+ |
605
+ = help: consider moving the module out to a nearby module scope
552
606
553
607
error: an extern block cannot be `default`
554
608
--> $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
563
617
|
564
618
LL | default extern "C" {}
565
619
| ^^^^^^^^^^^^^^^^^^
620
+ |
621
+ = help: consider moving the extern block out to a nearby module scope
566
622
567
623
error: an enum cannot be `default`
568
624
--> $DIR/default-on-wrong-item-kind.rs:120:5
@@ -577,6 +633,8 @@ error: enum is not supported in `trait`s or `impl`s
577
633
|
578
634
LL | default enum foo {}
579
635
| ^^^^^^^^^^^^^^^^
636
+ |
637
+ = help: consider moving the enum out to a nearby module scope
580
638
581
639
error: a struct cannot be `default`
582
640
--> $DIR/default-on-wrong-item-kind.rs:122:5
@@ -591,6 +649,8 @@ error: struct is not supported in `trait`s or `impl`s
591
649
|
592
650
LL | default struct foo {}
593
651
| ^^^^^^^^^^^^^^^^^^
652
+ |
653
+ = help: consider moving the struct out to a nearby module scope
594
654
595
655
error: a union cannot be `default`
596
656
--> $DIR/default-on-wrong-item-kind.rs:124:5
@@ -605,6 +665,8 @@ error: union is not supported in `trait`s or `impl`s
605
665
|
606
666
LL | default union foo {}
607
667
| ^^^^^^^^^^^^^^^^^
668
+ |
669
+ = help: consider moving the union out to a nearby module scope
608
670
609
671
error: a trait cannot be `default`
610
672
--> $DIR/default-on-wrong-item-kind.rs:126:5
@@ -619,6 +681,8 @@ error: trait is not supported in `trait`s or `impl`s
619
681
|
620
682
LL | default trait foo {}
621
683
| ^^^^^^^^^^^^^^^^^
684
+ |
685
+ = help: consider moving the trait out to a nearby module scope
622
686
623
687
error: a trait alias cannot be `default`
624
688
--> $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
633
697
|
634
698
LL | default trait foo = Ord;
635
699
| ^^^^^^^^^^^^^^^^^^^^^^^^
700
+ |
701
+ = help: consider moving the trait alias out to a nearby module scope
636
702
637
703
error: implementation is not supported in `trait`s or `impl`s
638
704
--> $DIR/default-on-wrong-item-kind.rs:130:5
639
705
|
640
706
LL | default impl foo {}
641
707
| ^^^^^^^^^^^^^^^^
708
+ |
709
+ = help: consider moving the implementation out to a nearby module scope
642
710
643
711
error: an item macro invocation cannot be `default`
644
712
--> $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
669
737
|
670
738
LL | default macro foo {}
671
739
| ^^^^^^^^^^^^^^^^^
740
+ |
741
+ = help: consider moving the macro definition out to a nearby module scope
672
742
673
743
error: a macro definition cannot be `default`
674
744
--> $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
683
753
|
684
754
LL | default macro_rules! foo {}
685
755
| ^^^^^^^^^^^^^^^^^^^^^^^^
756
+ |
757
+ = help: consider moving the macro definition out to a nearby module scope
686
758
687
759
error: aborting due to 95 previous errors
688
760
0 commit comments