1
Fork 0

pretty print hir attributes

This commit is contained in:
Jana Dönszelmann 2025-02-09 22:50:03 +01:00
parent 309b46ad68
commit 95b52d51ea
No known key found for this signature in database
11 changed files with 335 additions and 21 deletions

View file

@ -17,6 +17,7 @@ mod diagnostics;
mod extension;
mod hash_stable;
mod lift;
mod print_attribute;
mod query;
mod serialize;
mod symbols;
@ -175,3 +176,11 @@ decl_derive! {
/// The error type is `u32`.
try_from::try_from_u32
}
decl_derive! {
[PrintAttribute] =>
/// Derives `PrintAttribute` for `AttributeKind`.
/// This macro is pretty specific to `rustc_attr_data_structures` and likely not that useful in
/// other places. It's deriving something close to `Debug` without printing some extraenous
/// things like spans.
print_attribute::print_attribute
}