Skip to content

azriel91/proc_macro_attribute_order

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proc_macro_attribute_order

Shows the order of proc_macro_attribute execution for different attributes on the same item.

// attr_* appends a new field to the struct

#[attr_0(u8)]
#[attr_1(u16)]
#[attr_2(u32)]
struct Hello;

#[attr_2(u32)]
#[attr_1(u16)]
#[attr_0(u8)]
struct Hello2;

generates:

// cargo expand --test test
struct Hello(u8, u16, u32);
struct Hello2(u32, u16, u8);

About

Shows the order of proc_macro_attribute execution for different attributes on the same item.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages