mystor / synstructure

Utilities for dealing with substructures within syn macros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow creating impl block without requiring trait

holly-hacker opened this issue · comments

commented

I would like to use the library in the following way, but it doesn't seem to work:

s.gen_impl(quote! {
    gen impl @Self {
        pub fn my_fn(&self) -> u8 {
            match self {
                #my_stuff
            }
        }
    }
})