Rename procedural macro specializations without the "payload" suffix.
Those types will be reused in several places where the old suffix might
be counterintuitive.
libgrust/ChangeLog:
* libproc_macro/proc_macro.h (struct CustomDerivePayload):
Rename from CustomDerivePayload to...
(struct CustomDerive): ... CustomDerive
(struct AttrPayload): Rename from AttrPayload to ...
(struct Attribute): ... Attribute
(struct BangPayload): Rename from BangPayload to ...
(struct Bang): ... Bang
(union ProcmacroPayload): Update union with new names.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
using AttributeMacro = TokenStream (*) (TokenStream, TokenStream);
using BangMacro = TokenStream (*) (TokenStream);
-struct CustomDerivePayload
+struct CustomDerive
{
// TODO: UTF-8 function name
const char *trait_name;
CustomDeriveMacro macro;
};
-struct AttrPayload
+struct Attribute
{
// TODO: UTF-8 function name
const char *name;
AttributeMacro macro;
};
-struct BangPayload
+struct Bang
{
const char *name;
BangMacro macro;
union ProcmacroPayload
{
- CustomDerivePayload custom_derive;
- AttrPayload attribute;
- BangPayload bang;
+ CustomDerive custom_derive;
+ Attribute attribute;
+ Bang bang;
};
struct Procmacro