1
Fork 0

Make #[custom_encodable] an attribute for newtype_index

Makes the syntax a little more rusty.
This commit is contained in:
Nilstrieb 2022-12-18 21:02:14 +01:00
parent b4d739ef12
commit 88d5f7f4ce
6 changed files with 19 additions and 18 deletions

View file

@ -61,8 +61,8 @@ pub struct SyntaxContextData {
rustc_index::newtype_index! {
/// A unique ID associated with a macro invocation and expansion.
#[custom_encodable]
pub struct ExpnIndex {
ENCODABLE = custom
}
}
@ -82,8 +82,8 @@ impl fmt::Debug for ExpnId {
rustc_index::newtype_index! {
/// A unique ID associated with a macro invocation and expansion.
#[custom_encodable]
pub struct LocalExpnId {
ENCODABLE = custom
ORD_IMPL = custom
DEBUG_FORMAT = "expn{}"
}