use crate::ast;
use crate::attr::AttributeTemplate;
+use crate::sess::ParseSess;
use crate::symbol::{Symbol, sym};
-use crate::parse::ParseSess;
use syntax_pos::Span;
use rustc_data_structures::fx::FxHashMap;
// (name in cfg, feature, function to check if the feature is enabled)
(sym::target_thread_local, sym::cfg_target_thread_local, cfg_fn!(cfg_target_thread_local)),
(sym::target_has_atomic, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
+ (sym::target_has_atomic_load_store, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
(sym::rustdoc, sym::doc_cfg, cfg_fn!(doc_cfg)),
- (sym::doctest, sym::cfg_doctest, cfg_fn!(cfg_doctest)),
];
#[derive(Debug)]
ungated!(path, Normal, template!(NameValueStr: "file")),
ungated!(no_std, CrateLevel, template!(Word)),
ungated!(no_implicit_prelude, Normal, template!(Word)),
+ ungated!(non_exhaustive, Whitelisted, template!(Word)),
// Runtime
ungated!(windows_subsystem, Whitelisted, template!(NameValueStr: "windows|console")),
"the `link_args` attribute is experimental and not portable across platforms, \
it is recommended to use `#[link(name = \"foo\")] instead",
),
+ gated!(
+ link_ordinal, Whitelisted, template!(List: "ordinal"), raw_dylib,
+ experimental!(link_ordinal)
+ ),
// Plugins:
- ungated!(plugin_registrar, Normal, template!(Word)),
- gated!(
- plugin, CrateLevel, template!(List: "name|name(args)"),
- "compiler plugins are experimental and possibly buggy",
+ (
+ sym::plugin_registrar, Normal, template!(Word),
+ Gated(
+ Stability::Deprecated(
+ "https://github.com/rust-lang/rust/pull/64675",
+ Some("may be removed in a future compiler version"),
+ ),
+ sym::plugin_registrar,
+ "compiler plugins are deprecated",
+ cfg_fn!(plugin_registrar)
+ )
+ ),
+ (
+ sym::plugin, CrateLevel, template!(List: "name|name(args)"),
+ Gated(
+ Stability::Deprecated(
+ "https://github.com/rust-lang/rust/pull/64675",
+ Some("may be removed in a future compiler version"),
+ ),
+ sym::plugin,
+ "compiler plugins are deprecated",
+ cfg_fn!(plugin)
+ )
),
// Testing:
test_runner, CrateLevel, template!(List: "path"), custom_test_frameworks,
"custom test frameworks are an unstable feature",
),
-
- // RFC #2008
- gated!(non_exhaustive, Whitelisted, template!(Word), experimental!(non_exhaustive)),
// RFC #1268
gated!(marker, Normal, template!(Word), marker_trait_attr, experimental!(marker)),
gated!(
),
gated!(ffi_returns_twice, Whitelisted, template!(Word), experimental!(ffi_returns_twice)),
+ gated!(track_caller, Whitelisted, template!(Word), experimental!(track_caller)),
// ==========================================================================
// Internal attributes: Stability, deprecation, and unsafe:
// ==========================================================================
// Internal attributes, Misc:
// ==========================================================================
-
gated!(
lang, Normal, template!(NameValueStr: "name"), lang_items,
"language items are subject to change",
overflow checking behavior of several libcore functions that are inlined \
across crates and will never be stable",
),
+ rustc_attr!(rustc_reservation_impl, Normal, template!(NameValueStr: "reservation message"),
+ "the `#[rustc_reservation_impl]` attribute is internally used \
+ for reserving for `for<T> From<!> for T` impl"
+ ),
rustc_attr!(
rustc_test_marker, Normal, template!(Word),
"the `#[rustc_test_marker]` attribute is used internally to track tests",