Crate rustc_attr_data_structures

Source
Expand description

Data structures for representing parsed attributes in the Rust compiler. For detailed documentation about attribute processing, see rustc_attr_parsing.

Re-exportsยง

pub use ReprAttr::*;

Modulesยง

attributes ๐Ÿ”’
lints
stability ๐Ÿ”’
version ๐Ÿ”’

Macrosยง

find_attr
Finds attributes in sequences of attributes by pattern matching.
print_debug ๐Ÿ”’
print_disp ๐Ÿ”’
print_skip ๐Ÿ”’
print_tup ๐Ÿ”’

Structsยง

ConstStability
Represents the #[rustc_const_unstable] and #[rustc_const_stable] attributes.
DefaultBodyStability
Represents the #[rustc_default_body_unstable] attribute.
Deprecation
PartialConstStability
Excludes const_stable_indirect. This is necessary because when -Zforce-unstable-if-unmarked is set, we need to encode standalone #[rustc_const_stable_indirect] attributes
RustcVersion
Stability
Represents the following attributes:

Enumsยง

AttributeKind
Represents parsed built-in inert attributes.
DeprecatedSince
Release in which an API is deprecated.
InlineAttr
InstructionSetAttr
IntType
OptimizeAttr
ReprAttr
StabilityLevel
The available stability levels.
StableSince
Rust release in which a feature is stabilized.
TransparencyError
UnstableReason

Constantsยง

VERSION_PLACEHOLDER
The version placeholder that recently stabilized features contain inside the since field of the #[stable] attribute.

Traitsยง

HashStableContext
Requirements for a StableHashingContext to be used in this crate. This is a hack to allow using the HashStable_Generic derive macro instead of implementing everything in rustc_middle.
PrintAttribute
This trait is used to print attributes in rustc_hir_pretty.