Module builtin_attrs

Source
Expand description

Built-in attributes and cfg flag gating.

Macros§

experimental 🔒
gated 🔒
rustc_attr 🔒
template 🔒
A convenience macro for constructing attribute templates. E.g., template!(Word, List: "description") means that the attribute supports forms #[attr] and #[attr(description)].
ungated 🔒

Structs§

AttributeTemplate
A template that the attribute input must match. Only top-level shape (#[attr] vs #[attr(...)] vs #[attr = ...]) is considered now.
BuiltinAttribute

Enums§

AttributeDuplicates
How to handle multiple duplicate attributes on the same item.
AttributeGate
AttributeSafety
AttributeType
EncodeCrossCrate

Constants§

GATED_CFGS 🔒
cfg(...)’s that are feature gated.
IMPL_DETAIL 🔒
INTERNAL_UNSTABLE 🔒

Statics§

BUILTIN_ATTRIBUTES
Attributes that have a special meaning to rustc or rustdoc.
BUILTIN_ATTRIBUTE_MAP

Functions§

deprecated_attributes
encode_cross_crate
Whether this builtin attribute is encoded cross crate. This means it can be used cross crate.
find_gated_cfg
Find a gated cfg determined by the predicate which is given the cfg’s name.
is_builtin_attr_name
is_stable_diagnostic_attribute
is_valid_for_get_attr

Type Aliases§

GateFn 🔒
GatedCfg