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