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§

Decodable
Decodable_Generic
Diagnostic
Encodable
Encodable_Generic
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.
Lift
LintDiagnostic
MetadataDecodable
MetadataEncodable
Subdiagnostic
TryFromU32
Derives TryFrom<u32> for the annotated enum, which must have no fields. Each variant maps to the value it would produce under an as u32 cast.
TyDecodable
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).