Add a simple extension trait derive

This commit is contained in:
Michael Goulet 2024-02-13 23:49:28 +00:00
parent c9a7db6e20
commit 3250e95305
2 changed files with 142 additions and 0 deletions

View file

@ -14,6 +14,7 @@ use proc_macro::TokenStream;
mod current_version;
mod diagnostics;
mod extension;
mod hash_stable;
mod lift;
mod query;
@ -40,6 +41,11 @@ pub fn symbols(input: TokenStream) -> TokenStream {
symbols::symbols(input.into()).into()
}
#[proc_macro_attribute]
pub fn extension(_attr: TokenStream, input: TokenStream) -> TokenStream {
extension::extension(input)
}
decl_derive!([HashStable, attributes(stable_hasher)] => hash_stable::hash_stable_derive);
decl_derive!(
[HashStable_Generic, attributes(stable_hasher)] =>