Skip to content

Commit 7cf9f1a

Browse files
committed
change some attrs to only_local
1 parent 5ee1b18 commit 7cf9f1a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
343343
ungated!(repr, Normal, template!(List: "C"), DuplicatesOk),
344344
ungated!(export_name, Normal, template!(NameValueStr: "name"), FutureWarnPreceding),
345345
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),
348348

349349
// Limits:
350350
ungated!(recursion_limit, CrateLevel, template!(NameValueStr: "N"), FutureWarnFollowing),
@@ -377,8 +377,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
377377
ungated!(panic_handler, Normal, template!(Word), WarnFollowing), // RFC 2070
378378

379379
// 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),
382382
ungated!(no_builtins, CrateLevel, template!(Word), WarnFollowing),
383383
ungated!(target_feature, Normal, template!(List: r#"enable = "name""#), DuplicatesOk),
384384
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
@@ -404,7 +404,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
404404
),
405405

406406
// 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)),
408408
gated!(
409409
link_ordinal, Normal, template!(List: "ordinal"), ErrorPreceding, raw_dylib,
410410
experimental!(link_ordinal)
@@ -566,11 +566,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
566566
// ==========================================================================
567567

568568
gated!(
569-
linkage, Normal, template!(NameValueStr: "external|internal|..."), ErrorPreceding,
569+
linkage, Normal, template!(NameValueStr: "external|internal|..."), ErrorPreceding, @only_local: true,
570570
"the `linkage` attribute is experimental and not portable across platforms",
571571
),
572572
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
574574
),
575575

576576
// ==========================================================================

0 commit comments

Comments
 (0)