From b59e743666adba7ad0eb1a8eaea5c5ffb7086e01 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 9 Jan 2022 13:08:30 -0800 Subject: Mark windows_subsytem and no_builtins as crate-only attributes. These attributes are only checked at the crate root, so they should have a warning if they are used anywhere else. --- compiler/rustc_feature/src/builtin_attrs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_feature/src') diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index f25b2d8f566..ebd1b78b0cd 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -352,7 +352,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ // Runtime ungated!( - windows_subsystem, Normal, + windows_subsystem, CrateLevel, template!(NameValueStr: "windows|console"), FutureWarnFollowing ), ungated!(panic_handler, Normal, template!(Word), WarnFollowing), // RFC 2070 @@ -360,7 +360,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ // Code generation: ungated!(inline, Normal, template!(Word, List: "always|never"), FutureWarnFollowing), ungated!(cold, Normal, template!(Word), WarnFollowing), - ungated!(no_builtins, Normal, template!(Word), WarnFollowing), + ungated!(no_builtins, CrateLevel, template!(Word), WarnFollowing), ungated!(target_feature, Normal, template!(List: r#"enable = "name""#), DuplicatesOk), ungated!(track_caller, Normal, template!(Word), WarnFollowing), gated!( -- cgit 1.4.1-3-g733a5