pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGate)] =
&[("warn", Normal, Ungated), ("allow", Normal, Ungated),
("forbid", Normal, Ungated), ("deny", Normal, Ungated),
("macro_reexport", 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),
("simd", 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, Ungated), ("macro_escape", Normal, Ungated),
("structural_match", Whitelisted,
Gated(Stability::Unstable, "structural_match",
"the semantics of constant patterns is not yet settled",
{ f as fn(&Features) -> bool })),
("no_stack_check", Normal, Ungated),
("plugin", CrateLevel,
Gated(Stability::Unstable, "plugin",
"compiler plugins are experimental and possibly buggy",
{ f as fn(&Features) -> bool })), ("no_std", CrateLevel, Ungated),
("no_core", CrateLevel,
Gated(Stability::Unstable, "no_core", "no_core is experimental",
{ f as fn(&Features) -> bool })),
("lang", Normal,
Gated(Stability::Unstable, "lang_items",
"language items are subject to change",
{ f as fn(&Features) -> bool })),
("linkage", Whitelisted,
Gated(Stability::Unstable, "linkage",
"the `linkage` attribute is experimental and not portable across platforms",
{ 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. There is no corresponding `#[task_local]` mapping to the task model",
{ f as fn(&Features) -> bool })),
("rustc_on_unimplemented", Normal,
Gated(Stability::Unstable, "on_unimplemented",
"the `#[rustc_on_unimplemented]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("allocator", Whitelisted,
Gated(Stability::Unstable, "allocator",
"the `#[allocator]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("needs_allocator", Normal,
Gated(Stability::Unstable, "needs_allocator",
"the `#[needs_allocator]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("panic_runtime", Whitelisted,
Gated(Stability::Unstable, "panic_runtime",
"the `#[panic_runtime]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("needs_panic_runtime", Whitelisted,
Gated(Stability::Unstable, "needs_panic_runtime",
"the `#[needs_panic_runtime]` attribute is an experimental feature",
{ 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",
{ 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",
{ 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",
{ 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",
{ 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",
{ 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",
{ f as fn(&Features) -> bool })),
("rustc_metadata_dirty", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_metadata_dirty]` attribute is just used for rustc unit tests and will never be stable",
{ f as fn(&Features) -> bool })),
("rustc_metadata_clean", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_metadata_clean]` attribute is just used for rustc unit tests and will never be stable",
{ 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",
{ f as fn(&Features) -> bool })),
("rustc_partition_translated", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"this attribute is just used for rustc unit tests and will never be stable",
{ f as fn(&Features) -> bool })),
("rustc_symbol_name", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"internal rustc attributes will never be stable",
{ f as fn(&Features) -> bool })),
("rustc_item_path", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs",
"internal rustc attributes will never be stable",
{ f as fn(&Features) -> bool })),
("rustc_move_fragments", Normal,
Gated(Stability::Unstable, "rustc_attrs",
"the `#[rustc_move_fragments]` attribute is just used for rustc unit tests and will never be stable",
{ 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",
{ 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",
{ 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",
{ f as fn(&Features) -> bool })),
("allow_internal_unstable", Normal,
Gated(Stability::Unstable, "allow_internal_unstable",
EXPLAIN_ALLOW_INTERNAL_UNSTABLE, { f as fn(&Features) -> bool })),
("fundamental", Whitelisted,
Gated(Stability::Unstable, "fundamental",
"the `#[fundamental]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("linked_from", Normal,
Gated(Stability::Unstable, "linked_from",
"the `#[linked_from]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("proc_macro_derive", Normal,
Gated(Stability::Unstable, "proc_macro",
"the `#[proc_macro_derive]` attribute is an experimental feature",
{ f as fn(&Features) -> bool })),
("rustc_copy_clone_marker", Whitelisted,
Gated(Stability::Unstable, "rustc_attrs", "internal implementation detail",
{ 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",
{ f as fn(&Features) -> bool })),
("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 is an experimental feature",
{ 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",
{ f as fn(&Features) -> bool })),
("unsafe_destructor_blind_to_params", Normal,
Gated(Stability::Unstable, "dropck_parametricity",
"unsafe_destructor_blind_to_params has unstable semantics and may be removed in the future",
{ 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",
{ f as fn(&Features) -> bool })),
("unwind", Whitelisted,
Gated(Stability::Unstable, "unwind_attributes",
"#[unwind] is experimental", { f as fn(&Features) -> bool })),
("prelude_import", Whitelisted,
Gated(Stability::Unstable, "prelude_import",
"`#[prelude_import]` is for use by rustc only",
{ 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",
{ f as fn(&Features) -> bool })),
("rustc_reflect_like", Whitelisted,
Gated(Stability::Unstable, "reflect",
"defining reflective traits is still evolving",
{ 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)]