@@ -390,20 +390,21 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
390
390
391
391
// Entry point:
392
392
gated!(unix_sigpipe, Normal, template!(Word, NameValueStr: "inherit|sig_ign|sig_dfl"), ErrorFollowing, experimental!(unix_sigpipe)),
393
- ungated!(start, Normal, template!(Word), WarnFollowing),
394
- ungated!(no_start, CrateLevel, template!(Word), WarnFollowing),
395
- ungated!(no_main, CrateLevel, template!(Word), WarnFollowing),
393
+ ungated!(start, Normal, template!(Word), WarnFollowing, @only_local: true ),
394
+ ungated!(no_start, CrateLevel, template!(Word), WarnFollowing, @only_local: true ),
395
+ ungated!(no_main, CrateLevel, template!(Word), WarnFollowing, @only_local: true ),
396
396
397
397
// Modules, prelude, and resolution:
398
- ungated!(path, Normal, template!(NameValueStr: "file"), FutureWarnFollowing),
399
- ungated!(no_std, CrateLevel, template!(Word), WarnFollowing),
400
- ungated!(no_implicit_prelude, Normal, template!(Word), WarnFollowing),
398
+ ungated!(path, Normal, template!(NameValueStr: "file"), FutureWarnFollowing, @only_local: true ),
399
+ ungated!(no_std, CrateLevel, template!(Word), WarnFollowing, @only_local: true ),
400
+ ungated!(no_implicit_prelude, Normal, template!(Word), WarnFollowing, @only_local: true ),
401
401
ungated!(non_exhaustive, Normal, template!(Word), WarnFollowing),
402
402
403
403
// Runtime
404
404
ungated!(
405
405
windows_subsystem, CrateLevel,
406
- template!(NameValueStr: "windows|console"), FutureWarnFollowing
406
+ template!(NameValueStr: "windows|console"), FutureWarnFollowing,
407
+ @only_local: true
407
408
),
408
409
ungated!(panic_handler, Normal, template!(Word), WarnFollowing), // RFC 2070
409
410
@@ -416,13 +417,17 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
416
417
DuplicatesOk, @only_local: true,
417
418
),
418
419
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
419
- ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding),
420
+ ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding, @only_local: true ),
420
421
gated!(
421
422
no_sanitize, Normal,
422
423
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
423
- experimental!(no_sanitize)
424
+ @only_local: true, experimental!(no_sanitize)
425
+ ),
426
+ gated!(
427
+ coverage, Normal, template!(Word, List: "on|off"),
428
+ WarnFollowing, @only_local: true,
429
+ coverage_attribute, experimental!(coverage)
424
430
),
425
- gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, coverage_attribute, experimental!(coverage)),
426
431
427
432
ungated!(
428
433
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
@@ -431,7 +436,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
431
436
// Debugging
432
437
ungated!(
433
438
debugger_visualizer, Normal,
434
- template!(List: r#"natvis_file = "...", gdb_script_file = "...""#), DuplicatesOk
439
+ template!(List: r#"natvis_file = "...", gdb_script_file = "...""#),
440
+ DuplicatesOk, @only_local: true
435
441
),
436
442
437
443
// ==========================================================================
@@ -455,26 +461,35 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
455
461
marker_trait_attr, experimental!(marker)
456
462
),
457
463
gated!(
458
- thread_local, Normal, template!(Word), WarnFollowing,
464
+ thread_local, Normal, template!(Word), WarnFollowing, @only_local: true,
459
465
"`#[thread_local]` is an experimental feature, and does not currently handle destructors",
460
466
),
461
- gated!(no_core, CrateLevel, template!(Word), WarnFollowing, experimental!(no_core)),
467
+ gated!(
468
+ no_core, CrateLevel, template!(Word), WarnFollowing,
469
+ @only_local: true, experimental!(no_core)
470
+ ),
462
471
// RFC 2412
463
472
gated!(
464
- optimize, Normal, template!(List: "size|speed"), ErrorPreceding, optimize_attribute,
465
- experimental!(optimize),
473
+ optimize, Normal, template!(List: "size|speed"), ErrorPreceding,
474
+ @only_local: true, optimize_attribute, experimental!(optimize)
466
475
),
467
476
468
- gated!(ffi_pure, Normal, template!(Word), WarnFollowing, experimental!(ffi_pure)),
469
- gated!(ffi_const, Normal, template!(Word), WarnFollowing, experimental!(ffi_const)),
477
+ gated!(
478
+ ffi_pure, Normal, template!(Word), WarnFollowing,
479
+ @only_local: true, experimental!(ffi_pure)
480
+ ),
481
+ gated!(
482
+ ffi_const, Normal, template!(Word), WarnFollowing,
483
+ @only_local: true, experimental!(ffi_const)
484
+ ),
470
485
gated!(
471
486
register_tool, CrateLevel, template!(List: "tool1, tool2, ..."), DuplicatesOk,
472
- experimental!(register_tool),
487
+ @only_local: true, experimental!(register_tool),
473
488
),
474
489
475
490
gated!(
476
491
cmse_nonsecure_entry, Normal, template!(Word), WarnFollowing,
477
- experimental!(cmse_nonsecure_entry)
492
+ @only_local: true, experimental!(cmse_nonsecure_entry)
478
493
),
479
494
// RFC 2632
480
495
gated!(
@@ -492,11 +507,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
492
507
// `#[collapse_debuginfo]`
493
508
gated!(
494
509
collapse_debuginfo, Normal, template!(Word, List: "no|external|yes"), ErrorFollowing,
495
- experimental!(collapse_debuginfo)
510
+ @only_local: true, experimental!(collapse_debuginfo)
496
511
),
497
512
498
513
// RFC 2397
499
- gated!(do_not_recommend, Normal, template!(Word), WarnFollowing, experimental!(do_not_recommend)),
514
+ gated!(
515
+ do_not_recommend, Normal, template!(Word), WarnFollowing,
516
+ @only_local: true, experimental!(do_not_recommend)
517
+ ),
500
518
501
519
// `#[cfi_encoding = ""]`
502
520
gated!(
@@ -528,7 +546,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
528
546
),
529
547
ungated!(
530
548
rustc_default_body_unstable, Normal,
531
- template!(List: r#"feature = "name", reason = "...", issue = "N""#), DuplicatesOk
549
+ template!(List: r#"feature = "name", reason = "...", issue = "N""#),
550
+ DuplicatesOk, @only_local: true
532
551
),
533
552
gated!(
534
553
allow_internal_unstable, Normal, template!(Word, List: "feat1, feat2, ..."), DuplicatesOk,
0 commit comments