Skip to main content

Crate rustc_attr_ir

Crate rustc_attr_ir 

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::*;
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§

AttrItem
AttrPath
AutoDiffItem
We generate one of these structs for each #[autodiff(...)] attribute.
CanonicalSymbol
A representation of a canonical symbol
CanonicalSymbols
CfgHideShow
ConstStability
Represents the #[rustc_const_unstable] and #[rustc_const_stable] attributes.
DebugVisualizer
DefaultBodyStability
Represents the #[rustc_default_body_unstable] attribute.
Deprecation
DocAttribute
DocCfgHideShowValue
EiiDecl
EiiImpl
HashIgnoredAttrId
The derived implementation of StableHash on Attributes shouldn’t hash AttrIds. By wrapping them in this, we make sure we never do.
LinkEntry
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
RustcAutodiff
RustcCleanAttribute
RustcCleanQueries
Represents the except= or loaded_from_disk= argument of #[rustc_clean]
RustcVersion
SanitizerSet
Stability
Represents the following attributes:
StrippedCfgItem
UnstableRemovedFeature

Enums§

AttrArgs
Arguments passed to an attribute macro.
Attribute
Many functions on this type have their documentation in the AttributeExt trait, since they defer their implementation directly to that trait.
AttributeKind
Represents parsed built-in inert attributes.
BorrowckGraphvizFormatKind
CfgEntry
CguFields
CguKind
CollapseMacroDebuginfo
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 |
CoverageAttrKind
Successfully-parsed value of a #[coverage(..)] attribute.
CrateType
Crate type, as specified by #![crate_type]
DebuggerVisualizerType
DeprecatedSince
Release in which an API is deprecated.
DivergingBlockBehavior
DivergingFallbackBehavior
DocCfgHideShow
DocInline
EiiImplResolution
EncodeCrossCrate
HideOrShow
InlineAttr
InstructionSetAttr
InstrumentFnAttr
IntType
Linkage
Possible values for the #[linkage] attribute, allowing to specify the linkage type for a MonoItem.
MacroUseArgs
MirDialect
MirPhase
NativeLibKind
OptimizeAttr
PeImportNameType
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
ReprAttr
RtsanSetting
RustcAbiAttrKind
Successfully-parsed value of a #[rustc_abi(..)] attribute.
RustcDumpLayoutKind
RustcMirKind
StabilityLevel
The available stability levels.
StableSince
Rust release in which a feature is stabilized.
TransparencyError
UnrollAttr
UnstableReason
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)]
WindowsSubsystemKind

Constants§

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

Traits§

HasAttrs
A trait for types that can provide a list of attributes given a TyCtxt.
PrintAttribute
This trait is used to print attributes in rustc_hir_pretty.