@@ -343,8 +343,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
343
343
ungated ! ( repr, Normal , template!( List : "C" ) , DuplicatesOk ) ,
344
344
ungated ! ( export_name, Normal , template!( NameValueStr : "name" ) , FutureWarnPreceding ) ,
345
345
ungated ! ( link_section, Normal , template!( NameValueStr : "name" ) , FutureWarnPreceding ) ,
346
- ungated ! ( no_mangle, Normal , template!( Word ) , WarnFollowing ) ,
347
- ungated ! ( used, Normal , template!( Word , List : "compiler|linker" ) , WarnFollowing ) ,
346
+ ungated ! ( no_mangle, Normal , template!( Word ) , WarnFollowing , @only_local : true ) ,
347
+ ungated ! ( used, Normal , template!( Word , List : "compiler|linker" ) , WarnFollowing , @only_local : true ) ,
348
348
349
349
// Limits:
350
350
ungated ! ( recursion_limit, CrateLevel , template!( NameValueStr : "N" ) , FutureWarnFollowing ) ,
@@ -377,8 +377,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
377
377
ungated ! ( panic_handler, Normal , template!( Word ) , WarnFollowing ) , // RFC 2070
378
378
379
379
// Code generation:
380
- ungated ! ( inline, Normal , template!( Word , List : "always|never" ) , FutureWarnFollowing ) ,
381
- ungated ! ( cold, Normal , template!( Word ) , WarnFollowing ) ,
380
+ ungated ! ( inline, Normal , template!( Word , List : "always|never" ) , FutureWarnFollowing , @only_local : true ) ,
381
+ ungated ! ( cold, Normal , template!( Word ) , WarnFollowing , @only_local : true ) ,
382
382
ungated ! ( no_builtins, CrateLevel , template!( Word ) , WarnFollowing ) ,
383
383
ungated ! ( target_feature, Normal , template!( List : r#"enable = "name""# ) , DuplicatesOk ) ,
384
384
ungated ! ( track_caller, Normal , template!( Word ) , WarnFollowing ) ,
@@ -404,7 +404,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
404
404
) ,
405
405
406
406
// Linking:
407
- gated ! ( naked, Normal , template!( Word ) , WarnFollowing , naked_functions, experimental!( naked) ) ,
407
+ gated ! ( naked, Normal , template!( Word ) , WarnFollowing , @only_local : true , naked_functions, experimental!( naked) ) ,
408
408
gated ! (
409
409
link_ordinal, Normal , template!( List : "ordinal" ) , ErrorPreceding , raw_dylib,
410
410
experimental!( link_ordinal)
@@ -566,11 +566,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
566
566
// ==========================================================================
567
567
568
568
gated ! (
569
- linkage, Normal , template!( NameValueStr : "external|internal|..." ) , ErrorPreceding ,
569
+ linkage, Normal , template!( NameValueStr : "external|internal|..." ) , ErrorPreceding , @only_local : true ,
570
570
"the `linkage` attribute is experimental and not portable across platforms" ,
571
571
) ,
572
572
rustc_attr ! (
573
- rustc_std_internal_symbol, Normal , template!( Word ) , WarnFollowing , INTERNAL_UNSTABLE
573
+ rustc_std_internal_symbol, Normal , template!( Word ) , WarnFollowing , @only_local : true , INTERNAL_UNSTABLE
574
574
) ,
575
575
576
576
// ==========================================================================
0 commit comments