syntax::feature_gate::KNOWN_ATTRIBUTESUnstable [-] [+] [src]

pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
    // Normal attributes

    ("warn", Normal),
    ("allow", Normal),
    ("forbid", Normal),
    ("deny", Normal),

    ("macro_reexport", Normal),
    ("macro_use", Normal),
    ("macro_export", Normal),
    ("plugin_registrar", Normal),

    ("cfg", Normal),
    ("main", Normal),
    ("start", Normal),
    ("test", Normal),
    ("bench", Normal),
    ("simd", Normal),
    ("repr", Normal),
    ("path", Normal),
    ("abi", Normal),
    ("unsafe_destructor", Normal),
    ("automatically_derived", Normal),
    ("no_mangle", Normal),
    ("no_link", Normal),
    ("derive", Normal),
    ("should_fail", Normal),
    ("ignore", Normal),
    ("no_implicit_prelude", Normal),
    ("reexport_test_harness_main", Normal),
    ("link_args", Normal),
    ("macro_escape", Normal),


    ("staged_api", Gated("staged_api",
                         "staged_api is for use by rustc only")),
    ("plugin", Gated("plugin",
                     "compiler plugins are experimental \
                      and possibly buggy")),
    ("no_std", Gated("no_std",
                     "no_std is experimental")),
    ("lang", Gated("lang_items",
                     "language items are subject to change")),
    ("linkage", Gated("linkage",
                      "the `linkage` attribute is experimental \
                       and not portable across platforms")),
    ("thread_local", Gated("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")),

    ("rustc_on_unimplemented", Gated("on_unimplemented",
                                     "the `#[rustc_on_unimplemented]` attribute \
                                      is an experimental feature")),
    ("rustc_variance", Gated("rustc_attrs",
                             "the `#[rustc_variance]` attribute \
                              is an experimental feature")),
    ("rustc_error", Gated("rustc_attrs",
                          "the `#[rustc_error]` attribute \
                           is an experimental feature")),
    ("rustc_move_fragments", Gated("rustc_attrs",
                                   "the `#[rustc_move_fragments]` attribute \
                                    is an experimental feature")),

    // FIXME: #14408 whitelist docs since rustdoc looks at them
    ("doc", Whitelisted),

    // FIXME: #14406 these are processed in trans, which happens after the
    // lint pass
    ("cold", Whitelisted),
    ("export_name", Whitelisted),
    ("inline", Whitelisted),
    ("link", Whitelisted),
    ("link_name", Whitelisted),
    ("link_section", Whitelisted),
    ("no_builtins", Whitelisted),
    ("no_mangle", Whitelisted),
    ("no_split_stack", Whitelisted),
    ("no_stack_check", Whitelisted),
    ("packed", Whitelisted),
    ("static_assert", Whitelisted),
    ("no_debug", Whitelisted),
    ("omit_gdb_pretty_printer_section", Whitelisted),
    ("unsafe_no_drop_flag", Whitelisted),

    // used in resolve
    ("prelude_import", Whitelisted),

    // FIXME: #14407 these are only looked at on-demand so we can't
    // guarantee they'll have already been checked
    ("deprecated", Whitelisted),
    ("must_use", Whitelisted),
    ("stable", Whitelisted),
    ("unstable", Whitelisted),

    // FIXME: #19470 this shouldn't be needed forever
    ("old_orphan_check", Whitelisted),
    ("old_impl_check", Whitelisted),
    ("rustc_paren_sugar", Whitelisted), // FIXME: #18101 temporary unboxed closure hack

    // Crate level attributes
    ("crate_name", CrateLevel),
    ("crate_type", CrateLevel),
    ("crate_id", CrateLevel),
    ("feature", CrateLevel),
    ("no_start", CrateLevel),
    ("no_main", CrateLevel),
    ("no_builtins", CrateLevel),
    ("recursion_limit", CrateLevel),
]