Crate rustc_macros

Crate rustc_macros 

Source

Macros§

current_rustc_version
rustc_queries
symbols

Attribute Macros§

extension
Derive an extension trait for a given impl block. The trait name goes into the parenthesized args of the macro, for greppability. For example:

Derive Macros§

BlobDecodable
See docs on derive Decodable.
Decodable
Derives Decodable<D> for T where D: SpanDecoder
Decodable_NoContext
See docs on derive Decodable.
Diagnostic
Encodable
Encodable_NoContext
HashStable
HashStable_Generic
HashStable_NoContext
HashStable implementation that has no HashStableContext bound and which adds where bounds for HashStable based off of fields and not generics. This is suitable for use in crates like rustc_type_ir.
LazyDecodable
See docs on derive Decodable.
Lift
LintDiagnostic
MetadataEncodable
Most encodable derives mirror a decodable derive. MetadataEncodable is roughly mirrored by the combination of LazyDecodable and BlobDecodable
PrintAttribute
Derives PrintAttribute for AttributeKind. This macro is pretty specific to rustc_hir::attrs and likely not that useful in other places. It’s deriving something close to Debug without printing some extraneous things like spans.
Subdiagnostic
TyDecodable
See docs on derive Decodable.
TyEncodable
TypeFoldable
Derives TypeFoldable for the annotated struct or enum (union is not supported).
TypeVisitable
Derives TypeVisitable for the annotated struct or enum (union is not supported).
Walkable
Derives Walkable for the annotated struct or enum (union is not supported).