pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGate)] =
&[("warn", Normal, Ungated), ("allow", Normal, Ungated),
("forbid", Normal, Ungated), ("deny", Normal, Ungated),
("macro_use", Normal, Ungated), ("macro_export", Normal, Ungated),
("plugin_registrar", Normal, Ungated), ("cfg", Normal, Ungated),
("cfg_attr", Normal, Ungated), ("main", Normal, Ungated),
("start", Normal, Ungated), ("test", Normal, Ungated),
("bench", Normal, Ungated), ("repr", Normal, Ungated),
("path", Normal, Ungated), ("abi", Normal, Ungated),
("automatically_derived", Normal, Ungated), ("no_mangle", Normal, Ungated),
("no_link", Normal, Ungated), ("derive", Normal, Ungated),
("should_panic", Normal, Ungated), ("ignore", Normal, Ungated),
("no_implicit_prelude", Normal, Ungated),
("reexport_test_harness_main", Normal, Ungated),
("link_args", Normal,
Gated(Stability::Unstable, "link_args",
"the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = \"foo\")] instead",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("macro_escape", Normal, Ungated),
("structural_match", Whitelisted,
Gated(Stability::Unstable, "structural_match",
"the semantics of constant patterns is not yet settled",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("non_exhaustive", Whitelisted,
Gated(Stability::Unstable, "non_exhaustive",
"non exhaustive is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("plugin", CrateLevel,
Gated(Stability::Unstable, "plugin",
"compiler plugins are experimental and possibly buggy",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("no_std", CrateLevel, Ungated),
("no_core", CrateLevel,
Gated(Stability::Unstable, "no_core", "no_core is experimental",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("lang", Normal,
Gated(Stability::Unstable, "lang_items",
"language items are subject to change",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("linkage", Whitelisted,
Gated(Stability::Unstable, "linkage",
"the `linkage` attribute is experimental and not portable across platforms",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("thread_local", Whitelisted,
Gated(Stability::Unstable, "thread_local",
"`#[thread_local]` is an experimental feature, and does not currently handle destructors.",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_on_unimplemented", Normal,
Gated(Stability::Unstable, "on_unimplemented",
"the `#[rustc_on_unimplemented]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_const_unstable", Normal,
Gated(Stability::Unstable, "rustc_const_unstable",
"the `#[rustc_const_unstable]` attribute is an internal feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("global_allocator", Normal, Ungated),
("default_lib_allocator", Whitelisted,
Gated(Stability::Unstable, "allocator_internals",
"the `#[default_lib_allocator]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("needs_allocator", Normal,
Gated(Stability::Unstable, "allocator_internals",
"the `#[needs_allocator]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("panic_runtime", Whitelisted,
Gated(Stability::Unstable, "panic_runtime",
"the `#[panic_runtime]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("needs_panic_runtime", Whitelisted,
Gated(Stability::Unstable, "needs_panic_runtime",
"the `#[needs_panic_runtime]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_outlives", Normal,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_outlives]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_variance", Normal,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_regions", Normal,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_regions]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_error", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_if_this_changed", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_if_this_changed]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_then_this_would_need", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_if_this_changed]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_dirty", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_dirty]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_clean", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_clean]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_partition_reused", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_partition_codegened", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_synthetic", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_symbol_name", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"internal rustc attributes will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_item_path", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"internal rustc attributes will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_mir", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_mir]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_inherit_overflow_checks", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_inherit_overflow_checks]` attribute is just used to control overflow checking behavior of several libcore functions that are inlined across crates and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_dump_program_clauses", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_dump_program_clauses]` attribute is just used for rustc unit tests and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("nll", Whitelisted,
Gated(Stability::Unstable, "nll", "Non lexical lifetimes",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("compiler_builtins", Whitelisted,
Gated(Stability::Unstable, "compiler_builtins",
"the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("sanitizer_runtime", Whitelisted,
Gated(Stability::Unstable, "sanitizer_runtime",
"the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("profiler_runtime", Whitelisted,
Gated(Stability::Unstable, "profiler_runtime",
"the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("allow_internal_unstable", Normal,
Gated(Stability::Unstable, "allow_internal_unstable",
EXPLAIN_ALLOW_INTERNAL_UNSTABLE,
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("allow_internal_unsafe", Normal,
Gated(Stability::Unstable, "allow_internal_unsafe",
EXPLAIN_ALLOW_INTERNAL_UNSAFE,
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("fundamental", Whitelisted,
Gated(Stability::Unstable, "fundamental",
"the `#[fundamental]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("proc_macro_derive", Normal, Ungated),
("rustc_copy_clone_marker", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs", "internal implementation detail",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("doc", Whitelisted, Ungated), ("cold", Whitelisted, Ungated),
("naked", Whitelisted,
Gated(Stability::Unstable, "naked_functions",
"the `#[naked]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("target_feature", Whitelisted, Ungated),
("export_name", Whitelisted, Ungated), ("inline", Whitelisted, Ungated),
("link", Whitelisted, Ungated), ("link_name", Whitelisted, Ungated),
("link_section", Whitelisted, Ungated),
("no_builtins", Whitelisted, Ungated), ("no_mangle", Whitelisted, Ungated),
("no_debug", Whitelisted,
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721"),
"no_debug",
"the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("wasm_import_module", Normal,
Gated(Stability::Unstable, "wasm_import_module", "experimental attribute",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("omit_gdb_pretty_printer_section", Whitelisted,
Gated(Stability::Unstable, "omit_gdb_pretty_printer_section",
"the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("unsafe_destructor_blind_to_params", Normal,
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761"),
"dropck_parametricity",
"unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("may_dangle", Normal,
Gated(Stability::Unstable, "dropck_eyepatch",
"may_dangle has unstable semantics and may be removed in the future",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("unwind", Whitelisted,
Gated(Stability::Unstable, "unwind_attributes",
"#[unwind] is experimental",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("used", Whitelisted,
Gated(Stability::Unstable, "used",
"the `#[used]` attribute is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("prelude_import", Whitelisted,
Gated(Stability::Unstable, "prelude_import",
"`#[prelude_import]` is for use by rustc only",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("rustc_deprecated", Whitelisted, Ungated),
("must_use", Whitelisted, Ungated), ("stable", Whitelisted, Ungated),
("unstable", Whitelisted, Ungated), ("deprecated", Normal, Ungated),
("rustc_paren_sugar", Normal,
Gated(Stability::Unstable, "unboxed_closures",
"unboxed_closures are still evolving",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("windows_subsystem", Whitelisted, Ungated),
("proc_macro_attribute", Normal, Ungated), ("proc_macro", Normal, Ungated),
("rustc_derive_registrar", Normal,
Gated(Stability::Unstable, "rustc_derive_registrar",
"used internally by rustc",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("allow_fail", Normal,
Gated(Stability::Unstable, "allow_fail",
"allow_fail attribute is currently unstable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_std_internal_symbol", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this is an internal attribute that will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_conversion_suggestion", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this is an internal attribute that will never be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("rustc_args_required_const", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs", "never will be stable",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("infer_outlives_requirements", Normal,
Gated(Stability::Unstable, "infer_outlives_requirements",
"infer outlives requirements is an experimental feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("panic_implementation", Normal,
Gated(Stability::Unstable, "panic_implementation",
"#[panic_implementation] is an unstable feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})),
("alloc_error_handler", Normal,
Gated(Stability::Unstable, "alloc_error_handler",
"#[alloc_error_handler] is an unstable feature",
{
fn f(features: &Features) -> bool { loop { } }
f as fn(: &Features) -> bool
})), ("crate_name", CrateLevel, Ungated),
("crate_type", CrateLevel, Ungated), ("crate_id", CrateLevel, Ungated),
("feature", CrateLevel, Ungated), ("no_start", CrateLevel, Ungated),
("no_main", CrateLevel, Ungated), ("no_builtins", CrateLevel, Ungated),
("recursion_limit", CrateLevel, Ungated),
("type_length_limit", CrateLevel, Ungated)]