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::*;pub use lang_items::*;
Modules§
- attr 🔒
- canonical_
symbols 🔒 - data_
structures 🔒 - diagnostic
- Contains the data structures used by the diagnostic attribute family.
- diagnostic_
items - encode_
cross_ 🔒crate - lang_
items - Defines lang items.
- pretty_
printing 🔒 - stability 🔒
- target
- This module lists attribute targets, with conversions from other types.
- weak_
lang_ items - Validity checking for weak lang items
Macros§
- find_
attr - Finds attributes in sequences of attributes by pattern matching.
Structs§
- Attr
Item - Attr
Path - Auto
Diff Item - We generate one of these structs for each
#[autodiff(...)]attribute. - Canonical
Symbol - A representation of a canonical symbol
- Canonical
Symbols - CfgHide
Show - Const
Stability - Represents the
#[rustc_const_unstable]and#[rustc_const_stable]attributes. - Debug
Visualizer - Default
Body Stability - Represents the
#[rustc_default_body_unstable]attribute. - Deprecation
- DocAttribute
- DocCfg
Hide Show Value - EiiDecl
- EiiImpl
- Hash
Ignored Attr Id - The derived implementation of
StableHashonAttributes shouldn’t hashAttrIds. By wrapping them in this, we make sure we never do. - Link
Entry - Partial
Const Stability - Excludes
const_stable_indirect. This is necessary because when-Zforce-unstable-if-unmarkedis set, we need to encode standalone#[rustc_const_stable_indirect]attributes - Rustc
Autodiff - Rustc
Clean Attribute - Rustc
Clean Queries - Represents the
except=orloaded_from_disk=argument of#[rustc_clean] - Rustc
Version - Sanitizer
Set - Stability
- Represents the following attributes:
- Stripped
CfgItem - Unstable
Removed Feature
Enums§
- Attr
Args - Arguments passed to an attribute macro.
- Attribute
- Many functions on this type have their documentation in the
AttributeExttrait, since they defer their implementation directly to that trait. - Attribute
Kind - Represents parsed built-in inert attributes.
- Borrowck
Graphviz Format Kind - CfgEntry
- CguFields
- CguKind
- Collapse
Macro Debuginfo - How to perform collapse macros debug info if-ext - if macro from different crate (related to callsite code) | cmd \ attr | no | (unspecified) | external | yes | | no | no | no | no | no | | (unspecified) | no | no | if-ext | yes | | external | no | if-ext | if-ext | yes | | yes | yes | yes | yes | yes |
- Coverage
Attr Kind - Successfully-parsed value of a
#[coverage(..)]attribute. - Crate
Type - Crate type, as specified by
#![crate_type] - Debugger
Visualizer Type - Deprecated
Since - Release in which an API is deprecated.
- Diverging
Block Behavior - Diverging
Fallback Behavior - DocCfg
Hide Show - DocInline
- EiiImpl
Resolution - Encode
Cross Crate - Hide
OrShow - Inline
Attr - Instruction
SetAttr - Instrument
FnAttr - IntType
- Linkage
- Possible values for the
#[linkage]attribute, allowing to specify the linkage type for aMonoItem. - Macro
UseArgs - MirDialect
- MirPhase
- Native
LibKind - Optimize
Attr - PeImport
Name Type - Different ways that the PE Format can decorate a symbol name. From https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-name-type
- Repr
Attr - Rtsan
Setting - Rustc
AbiAttr Kind - Successfully-parsed value of a
#[rustc_abi(..)]attribute. - Rustc
Dump Layout Kind - Rustc
MirKind - Stability
Level - The available stability levels.
- Stable
Since - Rust release in which a feature is stabilized.
- Transparency
Error - Unroll
Attr - Unstable
Reason - UsedBy
- There are three valid forms of the attribute:
#[used], which is equivalent to#[used(linker)]on targets that support it, but#[used(compiler)]if not.#[used(compiler)]#[used(linker)] - Windows
Subsystem Kind
Constants§
- VERSION_
PLACEHOLDER - The version placeholder that recently stabilized features contain inside the
sincefield of the#[stable]attribute.
Traits§
- HasAttrs
- A trait for types that can provide a list of attributes given a
TyCtxt. - Print
Attribute - This trait is used to print attributes in
rustc_hir_pretty.